From: raster Date: Thu, 29 Mar 2012 08:56:10 +0000 (+0000) Subject: and kill warnings (-Wshadow) in ecore_getopt. pointed out that X-Git-Tag: 2.0_alpha~44^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c95823b0177a9bbe30515d23574492e67b4fef5;p=framework%2Fuifw%2Fecore.git and kill warnings (-Wshadow) in ecore_getopt. pointed out that ecore_getopt_help() cant be called from a thread either in the process. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@69728 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/ecore/ecore_getopt.c b/src/lib/ecore/ecore_getopt.c index 4c1152a..d334d2d 100644 --- a/src/lib/ecore/ecore_getopt.c +++ b/src/lib/ecore/ecore_getopt.c @@ -46,8 +46,8 @@ void *alloca(size_t); #include "Ecore_Getopt.h" static const char *prog = NULL; -static char **argv = NULL; -static int argc = 0; +static char **_argv = NULL; +static int _argc = 0; static int cols = 80; static int helpcol = 80 / 3; @@ -677,13 +677,14 @@ ecore_getopt_help(FILE *fp, { const char *var; + EINA_MAIN_LOOP_CHECK_RETURN; if (!parser) return; - if (argc < 1) + if (_argc < 1) { - ecore_app_args_get(&argc, &argv); - if ((argc > 0) && (argv[0])) - prog = argv[0]; + ecore_app_args_get(&_argc, &_argv); + if ((_argc > 0) && (_argv[0])) + prog = _argv[0]; else prog = parser->prog; }