diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-06 12:55:58 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2018-02-06 12:55:58 +0000 |
commit | 6c279ad6a71c63cb595fde7c951aadb31c3dbebc (patch) | |
tree | 3603f88e1b3bd1e622edb182cccd882dd31ddc8a /sql/set_var.cc | |
parent | f271100836d8a91a775894ec36b869a66a3145e5 (diff) | |
download | mariadb-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 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index 91224421117..1bdbd4e1f6e 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -673,7 +673,7 @@ SHOW_VAR* enumerate_sys_vars(THD *thd, bool sorted, enum enum_var_type scope) 0 Unknown variable (error message is given) */ -sys_var *intern_find_sys_var(const char *str, uint length) +sys_var *intern_find_sys_var(const char *str, size_t length) { sys_var *var; @@ -853,7 +853,7 @@ set_var::set_var(THD *thd, enum_var_type type_arg, sys_var *var_arg, // names are utf8 if (!(value= new (thd->mem_root) Item_string_sys(thd, item->field_name.str, - item->field_name.length))) + (uint)item->field_name.length))) value=value_arg; /* Give error message later */ } else |