summaryrefslogtreecommitdiff
path: root/libmysqld/libmysql.c
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2018-02-06 12:55:58 +0000
commit6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch)
tree3603f88e1b3bd1e622edb182cccd882dd31ddc8a /libmysqld/libmysql.c
parentf271100836d8a91a775894ec36b869a66a3145e5 (diff)
downloadmariadb-git-6c279ad6a71c63cb595fde7c951aadb31c3dbebc.tar.gz
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.
Diffstat (limited to 'libmysqld/libmysql.c')
-rw-r--r--libmysqld/libmysql.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libmysqld/libmysql.c b/libmysqld/libmysql.c
index db6fdaee206..b3ef96698ff 100644
--- a/libmysqld/libmysql.c
+++ b/libmysqld/libmysql.c
@@ -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;
}
}