1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +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

@ -3151,8 +3151,7 @@ static void read_binary_date(MYSQL_TIME *tm, uchar **pos)
length data length
*/
static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
uint length)
static void fetch_string_with_conversion(MYSQL_BIND *param, char *value, size_t length)
{
char *buffer= (char *)param->buffer;
int err= 0;
@ -3264,7 +3263,7 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
param->length will always contain length of entire column;
number of copied bytes may be way different:
*/
*param->length= length;
*param->length= (ulong)length;
break;
}
}