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/field_conv.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/field_conv.cc')
-rw-r--r-- | sql/field_conv.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/field_conv.cc b/sql/field_conv.cc index db5c9429954..4ab0f330814 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -389,7 +389,7 @@ static void do_field_varbinary_pre50(Copy_field *copy) copy->from_field->val_str(©->tmp); /* Use the same function as in 4.1 to trim trailing spaces */ - uint length= my_lengthsp_8bit(&my_charset_bin, copy->tmp.c_ptr_quick(), + size_t length= my_lengthsp_8bit(&my_charset_bin, copy->tmp.c_ptr_quick(), copy->from_field->field_length); copy->to_field->store(copy->tmp.c_ptr_quick(), length, @@ -481,7 +481,7 @@ static void do_cut_string_complex(Copy_field *copy) (char*) copy->from_ptr, (char*) from_end, copy->to_length / cs->mbmaxlen); - uint copy_length= prefix.length(); + size_t copy_length= prefix.length(); if (copy->to_length < copy_length) copy_length= copy->to_length; memcpy(copy->to_ptr, copy->from_ptr, copy_length); |