diff options
author | Michael Widenius <monty@askmonty.org> | 2010-04-01 12:04:26 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-04-01 12:04:26 +0300 |
commit | 1aafea91e5e11c355b978c85544059224ec473cf (patch) | |
tree | a6fe26c7dc5503bdb62ef60d3e7d5f4ca2b816bb /strings/my_vsnprintf.c | |
parent | fee40e27738122d5c7d7916a1cfa8cd2b5a20186 (diff) | |
parent | cebec393cf0a5558a2800fb193ba098bda4eabe1 (diff) | |
download | mariadb-git-1aafea91e5e11c355b978c85544059224ec473cf.tar.gz |
Merge with 5.1
Fixed valgrind warnings found from running main.connect under valgrind
sql/sp_head.cc:
Ensure that vcol_info is reset
sql/sql_acl.cc:
Fixed usage of wrong memroot for password
sql/sql_yacc.yy:
Ensure that vcol_info is reset
Diffstat (limited to 'strings/my_vsnprintf.c')
-rw-r--r-- | strings/my_vsnprintf.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/strings/my_vsnprintf.c b/strings/my_vsnprintf.c index ad8e7c8c776..79267461c47 100644 --- a/strings/my_vsnprintf.c +++ b/strings/my_vsnprintf.c @@ -400,16 +400,18 @@ start: case 's': { char *par= args_arr[print_arr[i].arg_idx].str_arg; - width= (print_arr[i].flags & WIDTH_ARG) ? - args_arr[print_arr[i].width].longlong_arg : print_arr[i].width; + width= ((print_arr[i].flags & WIDTH_ARG) ? + (uint) args_arr[print_arr[i].width].longlong_arg : + (uint) print_arr[i].width); to= process_str_arg(cs, to, end, width, par, print_arr[i].flags); break; } case 'b': { char *par = args_arr[print_arr[i].arg_idx].str_arg; - width= (print_arr[i].flags & WIDTH_ARG) ? - args_arr[print_arr[i].width].longlong_arg : print_arr[i].width; + width= ((print_arr[i].flags & WIDTH_ARG) ? + (uint) args_arr[print_arr[i].width].longlong_arg : + (uint) print_arr[i].width); to= process_bin_arg(to, end, width, par); break; } @@ -428,8 +430,9 @@ start: { /* Integer parameter */ longlong larg; - length= (print_arr[i].flags & LENGTH_ARG) ? - args_arr[print_arr[i].length].longlong_arg : print_arr[i].length; + length= ((print_arr[i].flags & LENGTH_ARG) ? + args_arr[print_arr[i].length].longlong_arg : + (longlong) print_arr[i].length); if (args_arr[print_arr[i].arg_idx].have_longlong) larg = args_arr[print_arr[i].arg_idx].longlong_arg; |