[PATCH] sh-18n: quell "unused variable" warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



    CC sh-i18n--envsubst.o
sh-i18n--envsubst.c: In Funktion ÂmainÂ:
sh-i18n--envsubst.c:71:22: Warnung: Variable Âshow_variables gesetzt,
aber nicht verwendet [-Wunused-but-set-variable]

show_variables is indeed unused. Comment it out rather than remove it so
that the relation with upstream remains clear.

Signed-off-by: Michael J Gruber <git@xxxxxxxxxxxxxxxxxxxx>
---
Why is it that even with LANG=C exported, gcc gives localized warnings?

And yes, I'm on gcc 4.6 now (F15)...
---
 sh-i18n--envsubst.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
index 7125093..2eb0ee4 100644
--- a/sh-i18n--envsubst.c
+++ b/sh-i18n--envsubst.c
@@ -68,7 +68,7 @@ int
 main (int argc, char *argv[])
 {
   /* Default values for command line options.  */
-  unsigned short int show_variables = 0;
+  /* unsigned short int show_variables = 0; */
 
   switch (argc)
 	{
@@ -88,7 +88,7 @@ main (int argc, char *argv[])
 	  /* git sh-i18n--envsubst --variables '$foo and $bar' */
 	  if (strcmp(argv[1], "--variables"))
 		error ("first argument must be --variables when two are given");
-	  show_variables = 1;
+	  /* show_variables = 1; */
       print_variables (argv[2]);
 	  break;
 	default:
-- 
1.7.5.2.639.gce8e1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]