diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index f7e9a14b33e..190bb2383e9 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -373,7 +373,7 @@ static void find_tool(char *tool_executable_name, const char *tool_name, } else { - size_t len; + int len; /* mysql_upgrade was run absolutely or relatively. We can find a sibling diff --git a/mysys/base64.c b/mysys/base64.c index f7d9c8b0d09..ab66715c929 100644 --- a/mysys/base64.c +++ b/mysys/base64.c @@ -223,7 +223,7 @@ base64_decode(const char *src_base, size_t len, The variable 'i' is set to 'len' when padding has been read, so it does not actually reflect the number of bytes read from 'src'. */ - return i != len ? -1 : (uint) (d - dst_base); + return i != len ? -1 : (int) (d - dst_base); } diff --git a/sql/log_event.cc b/sql/log_event.cc index a222534e8b7..dc886aa3309 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1289,7 +1289,6 @@ void Log_event::print_header(IO_CACHE* file, ptr[0], ptr[1], ptr[2], ptr[3], ptr[4], ptr[5], ptr[6], ptr[7], ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15], ptr[16], ptr[17], ptr[18]); - DBUG_ASSERT(bytes_written >= 0); DBUG_ASSERT(static_cast(bytes_written) < sizeof(emit_buf)); my_b_write(file, (uchar*) emit_buf, bytes_written); ptr += LOG_EVENT_MINIMAL_HEADER_LEN; @@ -1320,7 +1319,6 @@ void Log_event::print_header(IO_CACHE* file, "# %8.8lx %-48.48s |%16s|\n", (unsigned long) (hexdump_from + (i & 0xfffffff0)), hex_string, char_string); - DBUG_ASSERT(bytes_written >= 0); DBUG_ASSERT(static_cast(bytes_written) < sizeof(emit_buf)); my_b_write(file, (uchar*) emit_buf, bytes_written); hex_string[0]= 0; @@ -1340,7 +1338,6 @@ void Log_event::print_header(IO_CACHE* file, "# %8.8lx %-48.48s |%s|\n", (unsigned long) (hexdump_from + (i & 0xfffffff0)), hex_string, char_string); - DBUG_ASSERT(bytes_written >= 0); DBUG_ASSERT(static_cast(bytes_written) < sizeof(emit_buf)); my_b_write(file, (uchar*) emit_buf, bytes_written); } diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 25907d4ec20..32faeae9dcc 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -1114,7 +1114,7 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d", { memcpy(thd->query+thd->query_length+1, thd->db, thd->db_length); DBUG_PRINT("qcache", ("database: %s length: %u", - thd->db, thd->db_length)); + thd->db, (unsigned) thd->db_length)); } else { @@ -1307,7 +1307,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) { memcpy(sql+query_length+1, thd->db, thd->db_length); DBUG_PRINT("qcache", ("database: '%s' length: %u", - thd->db, thd->db_length)); + thd->db, (unsigned)thd->db_length)); } else { diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index b1c856c87aa..f8a8dea18ff 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -1290,8 +1290,8 @@ FOREIGN_SERVER *get_server_by_name(MEM_ROOT *mem, const char *server_name, (uchar*) server_name, server_name_length))) { - DBUG_PRINT("info", ("server_name %s length %d not found!", - server_name, server_name_length)); + DBUG_PRINT("info", ("server_name %s length %u not found!", + server_name, (unsigned) server_name_length)); server= (FOREIGN_SERVER *) NULL; } /* otherwise, make copy of server */ diff --git a/sql/sql_view.cc b/sql/sql_view.cc index 96448f7e5c2..65157ae4255 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -61,7 +61,8 @@ static void make_unique_view_field_name(Item *target, char *name= (target->orig_name ? target->orig_name : target->name); - size_t name_len, attempt; + size_t name_len; + uint attempt; char buff[NAME_LEN+1]; List_iterator_fast itc(item_list); diff --git a/storage/csv/transparent_file.cc b/storage/csv/transparent_file.cc index a200fa6ac36..fad7cd796e5 100644 --- a/storage/csv/transparent_file.cc +++ b/storage/csv/transparent_file.cc @@ -82,7 +82,7 @@ char Transparent_file::get_value(off_t offset) size_t bytes_read; /* check boundaries */ - if ((lower_bound <= offset) && (offset < upper_bound)) + if ((lower_bound <= offset) && (((my_off_t) offset) < upper_bound)) return buff[offset - lower_bound]; VOID(my_seek(filedes, offset, MY_SEEK_SET, MYF(0))); @@ -95,7 +95,7 @@ char Transparent_file::get_value(off_t offset) upper_bound= lower_bound + bytes_read; /* end of file */ - if (upper_bound == offset) + if (upper_bound == (my_off_t) offset) return 0; return buff[0];