diff options
author | Ignacio Galarza <iggy@mysql.com> | 2009-02-13 11:41:47 -0500 |
---|---|---|
committer | Ignacio Galarza <iggy@mysql.com> | 2009-02-13 11:41:47 -0500 |
commit | 5b7347bda31b9d66cd78937e5dc339f553b9a736 (patch) | |
tree | 85b39362efeae16536a90f3a3624acd6916d4305 /mysys/string.c | |
parent | 50b19265ffcf4e4708c86345a5c166c58dbdb523 (diff) | |
parent | 54fbbf9591e21cda9f7b26c2d795d88f51827f07 (diff) | |
download | mariadb-git-5b7347bda31b9d66cd78937e5dc339f553b9a736.tar.gz |
Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages. This change focuses on the warnings
that are covered by the ignore file: support-files/compiler_warnings.supp.
- Strings are guaranteed to be max uint in length
Diffstat (limited to 'mysys/string.c')
-rw-r--r-- | mysys/string.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mysys/string.c b/mysys/string.c index b234a589406..10a72b8a295 100644 --- a/mysys/string.c +++ b/mysys/string.c @@ -25,7 +25,7 @@ my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str, size_t init_alloc, size_t alloc_increment) { - uint length; + size_t length; DBUG_ENTER("init_dynamic_string"); if (!alloc_increment) @@ -100,7 +100,7 @@ my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, char *new_ptr; if (str->length+length >= str->max_length) { - uint new_length=(str->length+length+str->alloc_increment)/ + size_t new_length=(str->length+length+str->alloc_increment)/ str->alloc_increment; new_length*=str->alloc_increment; if (!(new_ptr=(char*) my_realloc(str->str,new_length,MYF(MY_WME)))) @@ -160,12 +160,12 @@ my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...) /* Search for quote in each string and replace with escaped quote */ while(*(next_pos= strcend(cur_pos, quote_str[0])) != '\0') { - ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos); + ret&= dynstr_append_mem(str, cur_pos, (uint) (next_pos - cur_pos)); ret&= dynstr_append_mem(str ,"\\", 1); ret&= dynstr_append_mem(str, quote_str, quote_len); cur_pos= next_pos + 1; } - ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos); + ret&= dynstr_append_mem(str, cur_pos, (uint) (next_pos - cur_pos)); append= va_arg(dirty_text, char *); } va_end(dirty_text); |