Shut up a gcc warning message.

* src/tar.c (tar_help_filter): Use a separate const
variable to hold returns from gettext. Reported by
Peter Breitenlohner.
This commit is contained in:
Sergey Poznyakoff
2010-03-11 12:26:57 +02:00
parent a3f1d933cc
commit 3f4a6d83f0

View File

@@ -1286,13 +1286,16 @@ tar_help_filter (int key, const char *text, void *input)
break;
case ARGP_KEY_HELP_EXTRA:
{
const char *tstr;
obstack_init (&stk);
s = _("Valid arguments for the --quoting-style option are:");
obstack_grow (&stk, s, strlen (s));
tstr = _("Valid arguments for the --quoting-style option are:");
obstack_grow (&stk, tstr, strlen (tstr));
obstack_grow (&stk, "\n\n", 2);
tar_list_quoting_styles (&stk, " ");
s = _("\n*This* tar defaults to:\n");
obstack_grow (&stk, s, strlen (s));
tstr = _("\n*This* tar defaults to:\n");
obstack_grow (&stk, tstr, strlen (tstr));
s = format_default_settings ();
obstack_grow (&stk, s, strlen (s));
obstack_1grow (&stk, '\n');
@@ -1300,6 +1303,7 @@ tar_help_filter (int key, const char *text, void *input)
s = xstrdup (obstack_finish (&stk));
obstack_free (&stk, NULL);
}
}
return s;
}