From 894fbe6862a1705062b132109f727fe513a8c8b5 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 5 Jan 2018 17:11:37 +0000 Subject: [PATCH] Fix warnings --- sql/rpl_utility.cc | 8 ++++---- sql/sql_acl.cc | 5 ++--- sql/sql_sequence.cc | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/sql/rpl_utility.cc b/sql/rpl_utility.cc index 9a984c5c953..dd7a6fd85c7 100644 --- a/sql/rpl_utility.cc +++ b/sql/rpl_utility.cc @@ -139,10 +139,10 @@ max_display_length_for_field(enum_field_types sql_type, unsigned int metadata) */ case MYSQL_TYPE_TINY_BLOB: - return my_set_bits(1 * 8); + return (uint32)my_set_bits(1 * 8); case MYSQL_TYPE_MEDIUM_BLOB: - return my_set_bits(3 * 8); + return (uint32)my_set_bits(3 * 8); case MYSQL_TYPE_BLOB: /* @@ -150,11 +150,11 @@ max_display_length_for_field(enum_field_types sql_type, unsigned int metadata) blobs are of type MYSQL_TYPE_BLOB. In that case, we have to look at the length instead to decide what the max display size is. */ - return my_set_bits(metadata * 8); + return (uint32)my_set_bits(metadata * 8); case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_GEOMETRY: - return my_set_bits(4 * 8); + return (uint32)my_set_bits(4 * 8); default: return ~(uint32) 0; diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index b75a582fc1b..35a9261cdb4 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -7391,9 +7391,8 @@ static bool grant_load(THD *thd, continue; } } - uint type= procs_priv.routine_type()->val_int(); - const Sp_handler *sph= Sp_handler::handler((stored_procedure_type) - type); + stored_procedure_type type= (stored_procedure_type)procs_priv.routine_type()->val_int(); + const Sp_handler *sph= Sp_handler::handler(type); if (!sph || !(hash= sph->get_priv_hash())) { sql_print_warning("'procs_priv' entry '%s' " diff --git a/sql/sql_sequence.cc b/sql/sql_sequence.cc index 82d53486c95..540b5cb7f09 100644 --- a/sql/sql_sequence.cc +++ b/sql/sql_sequence.cc @@ -112,7 +112,7 @@ bool sequence_definition::check_and_adjust(bool set_reserved_until) /* To ensure that cache * real_increment will never overflow */ max_increment= (real_increment ? - labs(real_increment) : + llabs(real_increment) : MAX_AUTO_INCREMENT_VALUE); if (max_value >= start &&