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/sql_error.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/sql_error.h')
-rw-r--r-- | sql/sql_error.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_error.h b/sql/sql_error.h index c74f6519129..67c6e50d283 100644 --- a/sql/sql_error.h +++ b/sql/sql_error.h @@ -591,7 +591,7 @@ private: @return true if the Warning_info contains an SQL-condition with the given message. */ - bool has_sql_condition(const char *message_str, ulong message_length) const; + bool has_sql_condition(const char *message_str, size_t message_length) const; /** Reset the warning information. Clear all warnings, @@ -1089,7 +1089,7 @@ public: ulong current_statement_warn_count() const { return get_warning_info()->current_statement_warn_count(); } - bool has_sql_condition(const char *message_str, ulong message_length) const + bool has_sql_condition(const char *message_str, size_t message_length) const { return get_warning_info()->has_sql_condition(message_str, message_length); } void reset_for_next_command() @@ -1240,9 +1240,9 @@ void push_warning_printf(THD *thd, Sql_condition::enum_warning_level level, bool mysqld_show_warnings(THD *thd, ulong levels_to_show); -uint32 convert_error_message(char *to, uint32 to_length, +size_t convert_error_message(char *to, size_t to_length, CHARSET_INFO *to_cs, - const char *from, uint32 from_length, + const char *from, size_t from_length, CHARSET_INFO *from_cs, uint *errors); extern const LEX_CSTRING warning_level_names[]; |