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_timefunc.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/item_timefunc.cc')
-rw-r--r-- | sql/item_timefunc.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index ed4b2839170..a048f4d933d 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -709,8 +709,7 @@ static bool make_date_time(DATE_TIME_FORMAT *format, MYSQL_TIME *l_time, For example, '1.1' -> '1.100000' */ -static bool get_interval_info(const char *str,uint length,CHARSET_INFO *cs, - uint count, ulonglong *values, +static bool get_interval_info(const char *str, size_t length,CHARSET_INFO *cs, size_t count, ulonglong *values, bool transform_msec) { const char *end=str+length; @@ -2427,7 +2426,7 @@ void Item_char_typecast::print(String *str, enum_query_type query_type) } -void Item_char_typecast::check_truncation_with_warn(String *src, uint dstlen) +void Item_char_typecast::check_truncation_with_warn(String *src, size_t dstlen) { if (dstlen < src->length()) { @@ -2448,7 +2447,7 @@ void Item_char_typecast::check_truncation_with_warn(String *src, uint dstlen) } -String *Item_char_typecast::reuse(String *src, uint32 length) +String *Item_char_typecast::reuse(String *src, size_t length) { DBUG_ASSERT(length <= src->length()); check_truncation_with_warn(src, length); |