mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Fixed compiler warnings detected by option -Wshadow and -Wunused:
- Removed not used variables and functions - Added #ifdef around code that is not used - Renamed variables and functions to avoid conflicts - Removed some not used arguments Fixed some class/struct warnings in ndb Added define IS_LONGDATA() to simplify code in libmysql.c I did run gcov on the changes and added 'purecov' comments on almost all lines that was not just variable name changes
This commit is contained in:
parent
601e6f4b2a
commit
88dd873de0
227 changed files with 3273 additions and 3082 deletions
|
|
@ -426,7 +426,7 @@ rl_redisplay ()
|
|||
#if defined (HANDLE_MULTIBYTE)
|
||||
wchar_t wc;
|
||||
size_t wc_bytes;
|
||||
int wc_width;
|
||||
int wc_width= 0;
|
||||
mbstate_t ps;
|
||||
int _rl_wrapped_multicolumn = 0;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -560,12 +560,12 @@ history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
|
|||
#if defined (HANDLE_MULTIBYTE)
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
{
|
||||
int c, l;
|
||||
int chr, l;
|
||||
l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY);
|
||||
c = string[l];
|
||||
chr = string[l];
|
||||
/* XXX - original patch had i - 1 ??? If i == 0 it would fail. */
|
||||
if (i && (c == '\'' || c == '"'))
|
||||
quoted_search_delimiter = c;
|
||||
if (i && (chr == '\'' || chr == '"'))
|
||||
quoted_search_delimiter = chr;
|
||||
}
|
||||
else
|
||||
#endif /* HANDLE_MULTIBYTE */
|
||||
|
|
|
|||
|
|
@ -529,17 +529,17 @@ _rl_read_mbchar (mbchar, size)
|
|||
may be FIRST. Used by the search functions, among others. Very similar
|
||||
to _rl_read_mbchar. */
|
||||
int
|
||||
_rl_read_mbstring (first, mb, mblen)
|
||||
_rl_read_mbstring (first, mb, mb_len)
|
||||
int first;
|
||||
char *mb;
|
||||
int mblen;
|
||||
int mb_len;
|
||||
{
|
||||
int i, c;
|
||||
mbstate_t ps;
|
||||
|
||||
c = first;
|
||||
memset (mb, 0, mblen);
|
||||
for (i = 0; i < mblen; i++)
|
||||
memset (mb, 0, mb_len);
|
||||
for (i = 0; i < mb_len; i++)
|
||||
{
|
||||
mb[i] = (char)c;
|
||||
memset (&ps, 0, sizeof (mbstate_t));
|
||||
|
|
|
|||
|
|
@ -1002,12 +1002,12 @@ _rl_rubout_char (count, key)
|
|||
}
|
||||
else
|
||||
{
|
||||
int orig_point;
|
||||
int orig_point2;
|
||||
|
||||
orig_point = rl_point;
|
||||
orig_point2 = rl_point;
|
||||
rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
|
||||
c = rl_line_buffer[rl_point];
|
||||
rl_delete_text (rl_point, orig_point);
|
||||
rl_delete_text (rl_point, orig_point2);
|
||||
}
|
||||
#endif /* HANDLE_MULTIBYTE */
|
||||
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ _rl_vi_change_mbchar_case (count)
|
|||
{
|
||||
wchar_t wc;
|
||||
char mb[MB_LEN_MAX+1];
|
||||
int mblen;
|
||||
int local_mblen;
|
||||
mbstate_t ps;
|
||||
|
||||
memset (&ps, 0, sizeof (mbstate_t));
|
||||
|
|
@ -695,9 +695,9 @@ _rl_vi_change_mbchar_case (count)
|
|||
/* Vi is kind of strange here. */
|
||||
if (wc)
|
||||
{
|
||||
mblen = wcrtomb (mb, wc, &ps);
|
||||
if (mblen >= 0)
|
||||
mb[mblen] = '\0';
|
||||
local_mblen = wcrtomb (mb, wc, &ps);
|
||||
if (local_mblen >= 0)
|
||||
mb[local_mblen] = '\0';
|
||||
rl_begin_undo_group ();
|
||||
rl_delete (1, 0);
|
||||
rl_insert_text (mb);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue