]> Dogcows Code - chaz/tar/commitdiff
Shut up a gcc warning message.
authorSergey Poznyakoff <gray@gnu.org.ua>
Thu, 11 Mar 2010 10:26:57 +0000 (12:26 +0200)
committerSergey Poznyakoff <gray@gnu.org.ua>
Thu, 11 Mar 2010 13:05:57 +0000 (15:05 +0200)
* src/tar.c (tar_help_filter): Use a separate const
variable to hold returns from gettext. Reported by
Peter Breitenlohner.

src/tar.c

index da124196ad48b5f74a209e0ae2fff475e2da480f..e3fdf7bcfa7f837d4ecb7cd87d20288c7f688a22 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -1254,7 +1254,7 @@ tar_help_filter (int key, const char *text, void *input)
 {
   struct obstack stk;
   char *s;
-
+  
   switch (key)
     {
     default:
@@ -1286,19 +1286,23 @@ tar_help_filter (int key, const char *text, void *input)
       break;
       
     case ARGP_KEY_HELP_EXTRA:
-      obstack_init (&stk);
-      s = _("Valid arguments for the --quoting-style option are:");
-      obstack_grow (&stk, s, strlen (s));
-      obstack_grow (&stk, "\n\n", 2);
-      tar_list_quoting_styles (&stk, "  ");
-      s = _("\n*This* tar defaults to:\n");
-      obstack_grow (&stk, s, strlen (s));
-      s = format_default_settings ();
-      obstack_grow (&stk, s, strlen (s));
-      obstack_1grow (&stk, '\n');
-      obstack_1grow (&stk, 0);
-      s = xstrdup (obstack_finish (&stk));
-      obstack_free (&stk, NULL);
+      {
+       const char *tstr;
+
+       obstack_init (&stk);
+       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, "  ");
+       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');
+       obstack_1grow (&stk, 0);
+       s = xstrdup (obstack_finish (&stk));
+       obstack_free (&stk, NULL);
+      }
     }
   return s;
 }
This page took 0.020489 seconds and 4 git commands to generate.