summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.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 /mysys/my_getopt.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 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 9e617366ed5..830b7f42473 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -826,7 +826,7 @@ static int setval(const struct my_option *opts, void *value, char *argument,
*((ulonglong*)value)=
find_set_from_flags(opts->typelib, opts->typelib->count,
*(ulonglong *)value, opts->def_value,
- argument, strlen(argument),
+ argument, (uint)strlen(argument),
&error, &error_len);
if (error)
{
@@ -1621,7 +1621,7 @@ void my_print_variables(const struct my_option *options)
for (optp= options; optp->name; optp++)
{
- length= strlen(optp->name)+1;
+ length= (uint)strlen(optp->name)+1;
if (length > name_space)
name_space= length;
}