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 /client/mysqlcheck.c | |
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 'client/mysqlcheck.c')
-rw-r--r-- | client/mysqlcheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 61210d4022e..0854c890824 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -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); |