summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/mysql_upgrade.c2
-rw-r--r--client/mysqladmin.cc2
-rw-r--r--client/mysqlbinlog.cc18
-rw-r--r--client/mysqlcheck.c9
-rw-r--r--client/mysqldump.c2
-rw-r--r--client/mysqlslap.c2
-rw-r--r--client/mysqltest.cc4
-rw-r--r--client/sql_string.cc2
8 files changed, 21 insertions, 20 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index 190bb2383e9..f7e9a14b33e 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
{
- int len;
+ size_t len;
/*
mysql_upgrade was run absolutely or relatively. We can find a sibling
diff --git a/client/mysqladmin.cc b/client/mysqladmin.cc
index 1e3249dd92a..df0dc1e7049 100644
--- a/client/mysqladmin.cc
+++ b/client/mysqladmin.cc
@@ -837,7 +837,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
bool old= (find_type(argv[0], &command_typelib, 2) ==
ADMIN_OLD_PASSWORD);
#ifdef __WIN__
- uint pw_len= strlen(pw);
+ uint pw_len= (uint) strlen(pw);
if (pw_len > 1 && pw[0] == '\'' && pw[pw_len-1] == '\'')
printf("Warning: single quotes were not trimmed from the password by"
" your command\nline client, as you might have expected.\n");
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 0b8e843887d..1621db5ded8 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -128,7 +128,7 @@ static Exit_status safe_connect();
class Load_log_processor
{
char target_dir_name[FN_REFLEN];
- int target_dir_name_len;
+ size_t target_dir_name_len;
/*
When we see first event corresponding to some LOAD DATA statement in
@@ -285,9 +285,9 @@ public:
File prepare_new_file_for_old_format(Load_log_event *le, char *filename);
Exit_status load_old_format_file(NET* net, const char *server_fname,
uint server_fname_len, File file);
- Exit_status process_first_event(const char *bname, uint blen,
+ Exit_status process_first_event(const char *bname, size_t blen,
const uchar *block,
- uint block_len, uint file_id,
+ size_t block_len, uint file_id,
Create_file_log_event *ce);
};
@@ -305,7 +305,7 @@ public:
File Load_log_processor::prepare_new_file_for_old_format(Load_log_event *le,
char *filename)
{
- uint len;
+ size_t len;
char *tail;
File file;
@@ -319,7 +319,7 @@ File Load_log_processor::prepare_new_file_for_old_format(Load_log_event *le,
return -1;
}
- le->set_fname_outside_temp_buf(filename,len+strlen(tail));
+ le->set_fname_outside_temp_buf(filename,len+(uint) strlen(tail));
return file;
}
@@ -411,9 +411,9 @@ Exit_status Load_log_processor::load_old_format_file(NET* net,
@retval OK_CONTINUE No error, the program should continue.
*/
Exit_status Load_log_processor::process_first_event(const char *bname,
- uint blen,
+ size_t blen,
const uchar *block,
- uint block_len,
+ size_t block_len,
uint file_id,
Create_file_log_event *ce)
{
@@ -456,7 +456,7 @@ Exit_status Load_log_processor::process_first_event(const char *bname,
}
if (ce)
- ce->set_fname_outside_temp_buf(fname, strlen(fname));
+ ce->set_fname_outside_temp_buf(fname, (uint) strlen(fname));
if (my_write(file, (uchar*)block, block_len, MYF(MY_WME|MY_NABP)))
{
@@ -1189,7 +1189,7 @@ static my_time_t convert_str_to_timestamp(const char* str)
long dummy_my_timezone;
my_bool dummy_in_dst_time_gap;
/* We require a total specification (date AND time) */
- if (str_to_datetime(str, strlen(str), &l_time, 0, &was_cut) !=
+ if (str_to_datetime(str, (uint) strlen(str), &l_time, 0, &was_cut) !=
MYSQL_TIMESTAMP_DATETIME || was_cut)
{
error("Incorrect date and time argument: %s", str);
diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c
index 86e1b3352b4..d2edd084c57 100644
--- a/client/mysqlcheck.c
+++ b/client/mysqlcheck.c
@@ -349,7 +349,7 @@ static int get_options(int *argc, char ***argv)
if (!what_to_do)
{
- int pnlen = strlen(my_progname);
+ size_t pnlen= strlen(my_progname);
if (pnlen < 6) /* name too short */
what_to_do = DO_CHECK;
@@ -448,7 +448,8 @@ static int process_selected_tables(char *db, char **table_names, int tables)
space is for more readable output in logs and in case of error
*/
char *table_names_comma_sep, *end;
- int i, tot_length = 0;
+ size_t tot_length= 0;
+ int i= 0;
for (i = 0; i < tables; i++)
tot_length+= fixed_name_length(*(table_names + i)) + 2;
@@ -464,7 +465,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
*end++= ',';
}
*--end = 0;
- handle_request_for_tables(table_names_comma_sep + 1, tot_length - 1);
+ handle_request_for_tables(table_names_comma_sep + 1, (uint) (tot_length - 1));
my_free(table_names_comma_sep, MYF(0));
}
else
@@ -486,7 +487,7 @@ static uint fixed_name_length(const char *name)
else if (*p == '.')
extra_length+= 2;
}
- return (p - name) + extra_length;
+ return (uint) ((p - name) + extra_length);
}
diff --git a/client/mysqldump.c b/client/mysqldump.c
index bc1186261ec..5a1fa3cc090 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -802,7 +802,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
opt_set_charset= 0;
opt_compatible_mode_str= argument;
opt_compatible_mode= find_set(&compatible_mode_typelib,
- argument, strlen(argument),
+ argument, (uint) strlen(argument),
&err_ptr, &err_len);
if (err_len)
{
diff --git a/client/mysqlslap.c b/client/mysqlslap.c
index 9ba912d646c..b8515289df5 100644
--- a/client/mysqlslap.c
+++ b/client/mysqlslap.c
@@ -1929,7 +1929,7 @@ parse_option(const char *origin, option_string **stmt, char delm)
char *ptr= (char *)origin;
option_string **sptr= stmt;
option_string *tmp;
- uint length= strlen(origin);
+ size_t length= strlen(origin);
uint count= 0; /* We know that there is always one */
for (tmp= *sptr= (option_string *)my_malloc(sizeof(option_string),
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index e9e462b8d3f..34dceafd14a 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -1316,7 +1316,7 @@ void log_msg(const char *fmt, ...)
void cat_file(DYNAMIC_STRING* ds, const char* filename)
{
int fd;
- uint len;
+ size_t len;
char buff[512];
if ((fd= my_open(filename, O_RDONLY, MYF(0))) < 0)
@@ -1614,7 +1614,7 @@ int compare_files2(File fd, const char* filename2)
{
int error= RESULT_OK;
File fd2;
- uint len, len2;
+ size_t len, len2;
char buff[512], buff2[512];
if ((fd2= my_open(filename2, O_RDONLY, MYF(0))) < 0)
diff --git a/client/sql_string.cc b/client/sql_string.cc
index 5a922b9361c..dc6147b563f 100644
--- a/client/sql_string.cc
+++ b/client/sql_string.cc
@@ -465,7 +465,7 @@ bool String::append(const char *s,uint32 arg_length)
bool String::append(const char *s)
{
- return append(s, strlen(s));
+ return append(s, (uint) strlen(s));
}