1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

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.
This commit is contained in:
Vladislav Vaintroub
2018-02-06 12:55:58 +00:00
parent f271100836
commit 6c279ad6a7
257 changed files with 1514 additions and 1543 deletions

View File

@@ -541,7 +541,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
{
int view;
char *table;
uint table_len;
size_t table_len;
DBUG_ENTER("process_selected_tables");
if (use_db(db))
@@ -669,7 +669,7 @@ static int process_all_tables_in_db(char *database)
size_t tot_length = 0;
char *views, *views_end;
uint tot_views_length = 0;
size_t tot_views_length = 0;
while ((row = mysql_fetch_row(res)))
{
@@ -966,7 +966,7 @@ static int handle_request_for_tables(char *tables, size_t length,
}
if (verbose >= 3)
puts(query);
if (mysql_real_query(sock, query, query_length))
if (mysql_real_query(sock, query, (ulong)query_length))
{
sprintf(message, "when executing '%s%s... %s'", op, tab_view, options);
DBerror(sock, message);
@@ -977,7 +977,7 @@ static int handle_request_for_tables(char *tables, size_t length,
if (opt_flush_tables)
{
query_length= sprintf(query, "FLUSH TABLES %s", table_name);
if (mysql_real_query(sock, query, query_length))
if (mysql_real_query(sock, query, (ulong)query_length))
{
DBerror(sock, query);
my_free(query);