Get rid of -Wshadow warning - I guess we're including something that

gets <getopt.h>, so we get the optarg global.

svn path=/trunk/; revision=51348
This commit is contained in:
Guy Harris 2013-08-14 00:41:02 +00:00
parent b65e9e9618
commit 34108edbd1
1 changed files with 5 additions and 5 deletions

View File

@ -573,18 +573,18 @@ stats_tree_manip_node(manip_node_mode mode, stats_tree *st, const char *name,
extern char*
stats_tree_get_abbr(const char *optarg)
stats_tree_get_abbr(const char *opt_arg)
{
guint i;
/* XXX: this fails when tshark is given any options
after the -z */
g_assert(optarg != NULL);
g_assert(opt_arg != NULL);
for (i=0; optarg[i] && optarg[i] != ','; i++);
for (i=0; opt_arg[i] && opt_arg[i] != ','; i++);
if (optarg[i] == ',') {
return g_strndup(optarg,i);
if (opt_arg[i] == ',') {
return g_strndup(opt_arg,i);
} else {
return NULL;
}