1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-15091 : Windows, 64bit: reenable and fix warning C4267 (conversion from 'size_t' to 'type', possible loss of data)

Handle string length as size_t, consistently (almost always:))
Change function prototypes to accept size_t, where in the past
ulong or uint were used. change local/member variables to size_t
when appropriate.

This fix excludes rocksdb, spider,spider, sphinx and connect for now.
This commit is contained in:
Vladislav Vaintroub
2018-02-06 12:55:58 +00:00
parent f271100836
commit 6c279ad6a7
257 changed files with 1514 additions and 1543 deletions

View File

@@ -572,7 +572,7 @@ inline_mysql_socket_bind
#ifdef HAVE_PSI_SOCKET_INTERFACE
const char *src_file, uint src_line,
#endif
MYSQL_SOCKET mysql_socket, const struct sockaddr *addr, socklen_t len)
MYSQL_SOCKET mysql_socket, const struct sockaddr *addr, size_t len)
{
int result;
@@ -586,11 +586,11 @@ inline_mysql_socket_bind
(&state, mysql_socket.m_psi, PSI_SOCKET_BIND, (size_t)0, src_file, src_line);
/* Instrumented code */
result= bind(mysql_socket.fd, addr, len);
result= bind(mysql_socket.fd, addr, (int)len);
/* Instrumentation end */
if (result == 0)
PSI_SOCKET_CALL(set_socket_info)(mysql_socket.m_psi, NULL, addr, len);
PSI_SOCKET_CALL(set_socket_info)(mysql_socket.m_psi, NULL, addr, (socklen_t)len);
if (locker != NULL)
PSI_SOCKET_CALL(end_socket_wait)(locker, (size_t)0);
@@ -600,7 +600,7 @@ inline_mysql_socket_bind
#endif
/* Non instrumented code */
result= bind(mysql_socket.fd, addr, len);
result= bind(mysql_socket.fd, addr, (int)len);
return result;
}