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/item_func.h | |
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/item_func.h')
-rw-r--r-- | sql/item_func.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index 1f942ab1b55..536fe1bd5a7 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -2407,7 +2407,7 @@ public: String *str_result(String *str); my_decimal *val_decimal_result(my_decimal *); bool is_null_result(); - bool update_hash(void *ptr, uint length, enum Item_result type, + bool update_hash(void *ptr, size_t length, enum Item_result type, CHARSET_INFO *cs, bool unsigned_arg); bool send(Protocol *protocol, st_value *buffer); void make_field(THD *thd, Send_field *tmp_field); @@ -2493,7 +2493,7 @@ public: { DBUG_ASSERT(a->length < UINT_MAX32); org_name= *a; - set_name(thd, a->str, (uint) a->length, system_charset_info); + set_name(thd, a->str, a->length, system_charset_info); } /* We should return something different from FIELD_ITEM here */ enum Type type() const { return STRING_ITEM;} |