summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
authorDavi Arnaut <davi.arnaut@oracle.com>2010-09-24 19:13:51 -0300
committerDavi Arnaut <davi.arnaut@oracle.com>2010-09-24 19:13:51 -0300
commit58dfba2899474553592479be24ef73947775eeaf (patch)
tree275b3a2bcb353bcf87c17aa9f8ca8e8d849cff9b /mysys/my_getopt.c
parent930a50f9d3709fb18c30a1c4d4f1b9908d53ed1f (diff)
downloadmariadb-git-58dfba2899474553592479be24ef73947775eeaf.tar.gz
Bug#45288: pb2 returns a lot of compilation warnings on linux
Use UNINIT_VAR workaround instead of LINT_INIT. The former can also be used to silence false-positives in non-debug builds as it actually does not cause new code to be generated.
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 0327db33e98..069626ba004 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -112,7 +112,7 @@ int handle_options(int *argc, char ***argv,
const struct my_option *longopts,
my_get_one_option get_one_option)
{
- uint opt_found, argvpos= 0, length;
+ uint UNINIT_VAR(opt_found), argvpos= 0, length;
my_bool end_of_options= 0, must_be_var, set_maximum_value,
option_is_loose;
char **pos, **pos_end, *optend, *opt_str, key_name[FN_REFLEN];
@@ -121,7 +121,6 @@ int handle_options(int *argc, char ***argv,
void *value;
int error, i;
- LINT_INIT(opt_found);
/* handle_options() assumes arg0 (program name) always exists */
DBUG_ASSERT(argc && *argc >= 1);
DBUG_ASSERT(argv && *argv);