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 | |
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')
-rw-r--r-- | strings/ctype-ucs2.c | 6 | ||||
-rw-r--r-- | strings/ctype-utf8.c | 4 | ||||
-rw-r--r-- | strings/my_vsnprintf.c | 15 |
3 files changed, 14 insertions, 11 deletions
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c index ac4bec26a2f..d76cbb6e64c 100644 --- a/strings/ctype-ucs2.c +++ b/strings/ctype-ucs2.c @@ -203,7 +203,7 @@ static int my_strnncoll_ucs2(CHARSET_INFO *cs, my_bool t_is_prefix) { int s_res,t_res; - my_wc_t UNINIT_VAR(s_wc),t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se=s+slen; const uchar *te=t+tlen; MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; @@ -317,7 +317,7 @@ static int my_strncasecmp_ucs2(CHARSET_INFO *cs, const char *s, const char *t, size_t len) { int s_res,t_res; - my_wc_t UNINIT_VAR(s_wc),t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const char *se=s+len; const char *te=t+len; MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; @@ -1384,7 +1384,7 @@ int my_strnncoll_ucs2_bin(CHARSET_INFO *cs, my_bool t_is_prefix) { int s_res,t_res; - my_wc_t UNINIT_VAR(s_wc),t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se=s+slen; const uchar *te=t+tlen; diff --git a/strings/ctype-utf8.c b/strings/ctype-utf8.c index 7ddb852fa79..81329031b0b 100644 --- a/strings/ctype-utf8.c +++ b/strings/ctype-utf8.c @@ -2308,7 +2308,7 @@ static int my_strnncoll_utf8(CHARSET_INFO *cs, my_bool t_is_prefix) { int s_res,t_res; - my_wc_t UNINIT_VAR(s_wc), t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se=s+slen; const uchar *te=t+tlen; MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; @@ -2378,7 +2378,7 @@ static int my_strnncollsp_utf8(CHARSET_INFO *cs, my_bool diff_if_only_endspace_difference) { int s_res, t_res, res; - my_wc_t UNINIT_VAR(s_wc),t_wc; + my_wc_t UNINIT_VAR(s_wc), UNINIT_VAR(t_wc); const uchar *se= s+slen, *te= t+tlen; MY_UNICASE_INFO *const *uni_plane= cs->caseinfo; 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; |