diff options
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); |