mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Bug #43414 Parenthesis (and other) warnings compiling MySQL
with gcc 4.3.2
This patch fixes a number of GCC warnings about variables used
before initialized. A new macro UNINIT_VAR() is introduced for
use in the variable declaration, and LINT_INIT() usage will be
gradually deprecated. (A workaround is used for g++, pending a
patch for a g++ bug.)
GCC warnings for unused results (attribute warn_unused_result)
for a number of system calls (present at least in later
Ubuntus, where the usual void cast trick doesn't work) are
also fixed.
client/mysqlmanager-pwgen.c:
A fix for warn_unused_result, adding fallback to use of
srand()/rand() if /dev/random cannot be used. Also actually
adds calls to rand() in the second branch so that it actually
creates a random password.
This commit is contained in:
parent
5edd807a7a
commit
1ba25ae47c
51 changed files with 142 additions and 191 deletions
|
|
@ -100,7 +100,7 @@ int handle_options(int *argc, char ***argv,
|
|||
uint opt_found, argvpos= 0, length, i;
|
||||
my_bool end_of_options= 0, must_be_var, set_maximum_value,
|
||||
option_is_loose;
|
||||
char **pos, **pos_end, *optend, *prev_found,
|
||||
char **pos, **pos_end, *optend, *UNINIT_VAR(prev_found),
|
||||
*opt_str, key_name[FN_REFLEN];
|
||||
const struct my_option *optp;
|
||||
gptr *value;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue