mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Bug#45288: pb2 returns a lot of compilation warnings
Fix assorted warnings that are generated in optimized builds. Most of it is silencing variables that are set but unused. This patch also introduces the MY_ASSERT_UNREACHABLE macro which helps the compiler to deduce that a certain piece of code is unreachable.
This commit is contained in:
@ -1839,8 +1839,11 @@ rl_username_completion_function (text, state)
|
||||
#else /* !__WIN32__ && !__OPENNT) */
|
||||
static char *username = (char *)NULL;
|
||||
static struct passwd *entry;
|
||||
static int namelen, first_char, first_char_loc;
|
||||
static int first_char, first_char_loc;
|
||||
char *value;
|
||||
#if defined (HAVE_GETPWENT)
|
||||
static int namelen;
|
||||
#endif
|
||||
|
||||
if (state == 0)
|
||||
{
|
||||
@ -1850,7 +1853,9 @@ rl_username_completion_function (text, state)
|
||||
first_char_loc = first_char == '~';
|
||||
|
||||
username = savestring (&text[first_char_loc]);
|
||||
#if defined (HAVE_GETPWENT)
|
||||
namelen = strlen (username);
|
||||
#endif
|
||||
setpwent ();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user