{"thread":{"id":"27452","subject":"[PATCH] sh-18n: quell \"unused variable\" warning","startedAt":"2011-05-25T09:55:43Z","lastAt":"2011-05-26T13:46:00Z","messageCount":5,"participants":["Michael J Gruber","Junio C Hamano","Ævar Arnfjörð Bjarmason"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"168633","messageId":"62c2e1619edcb37c0411f29a34b6bc10e3899a97.1306317312.git.git@drmicha.warpmail.net","threadId":"27452","inReplyTo":null,"subject":"[PATCH] sh-18n: quell \"unused variable\" warning","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-05-25T09:55:43Z","receivedAt":"2011-05-25T09:55:43Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"    CC sh-i18n--envsubst.o\nsh-i18n--envsubst.c: In Funktion »main«:\nsh-i18n--envsubst.c:71:22: Warnung: Variable »show_variables« gesetzt,\naber nicht verwendet [-Wunused-but-set-variable]\n\nshow_variables is indeed unused. Comment it out rather than remove it so\nthat the relation with upstream remains clear.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nWhy is it that even with LANG=C exported, gcc gives localized warnings?\n\nAnd yes, I'm on gcc 4.6 now (F15)...\n---\n sh-i18n--envsubst.c |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c\nindex 7125093..2eb0ee4 100644\n--- a/sh-i18n--envsubst.c\n+++ b/sh-i18n--envsubst.c\n@@ -68,7 +68,7 @@ int\n main (int argc, char *argv[])\n {\n   /* Default values for command line options.  */\n-  unsigned short int show_variables = 0;\n+  /* unsigned short int show_variables = 0; */\n \n   switch (argc)\n \t{\n@@ -88,7 +88,7 @@ main (int argc, char *argv[])\n \t  /* git sh-i18n--envsubst --variables '$foo and $bar' */\n \t  if (strcmp(argv[1], \"--variables\"))\n \t\terror (\"first argument must be --variables when two are given\");\n-\t  show_variables = 1;\n+\t  /* show_variables = 1; */\n       print_variables (argv[2]);\n \t  break;\n \tdefault:\n-- \n1.7.5.2.639.gce8e1\n"},{"id":"168680","messageId":"7vy61u4u1y.fsf@alter.siamese.dyndns.org","threadId":"27452","inReplyTo":"62c2e1619edcb37c0411f29a34b6bc10e3899a97.1306317312.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] sh-18n: quell \"unused variable\" warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-05-25T16:35:37Z","receivedAt":"2011-05-25T16:35:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n>     CC sh-i18n--envsubst.o\n> sh-i18n--envsubst.c: In Funktion »main«:\n> sh-i18n--envsubst.c:71:22: Warnung: Variable »show_variables« gesetzt,\n> aber nicht verwendet [-Wunused-but-set-variable]\n>\n> show_variables is indeed unused. Comment it out rather than remove it so\n> that the relation with upstream remains clear.\n>\n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n> Why is it that even with LANG=C exported, gcc gives localized warnings?\n\nBecause you probably do not have LC_ALL=C?\n\nIn any case, thanks.\n"},{"id":"168735","messageId":"BANLkTi=Mgd7=eriOsz1phDBJ25Com2Y=mQ@mail.gmail.com","threadId":"27452","inReplyTo":"62c2e1619edcb37c0411f29a34b6bc10e3899a97.1306317312.git.git@drmicha.warpmail.net","subject":"Re: [PATCH] sh-18n: quell \"unused variable\" warning","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-05-25T23:33:26Z","receivedAt":"2011-05-25T23:33:26Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Wed, May 25, 2011 at 11:55, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n\nI suppose it was inevitable that we'd end up maintaining this since\nupstream only maintains the GPLv3 version now.\n\n>   /* Default values for command line options.  */\n> -  unsigned short int show_variables = 0;\n> +  /* unsigned short int show_variables = 0; */\n\n> -         show_variables = 1;\n> +         /* show_variables = 1; */\n\nCan we just remove these lines instead of commenting them out?\n"},{"id":"168759","messageId":"4DDE4F92.7030301@drmicha.warpmail.net","threadId":"27452","inReplyTo":"BANLkTi=Mgd7=eriOsz1phDBJ25Com2Y=mQ@mail.gmail.com","subject":"Re: [PATCH] sh-18n: quell \"unused variable\" warning","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2011-05-26T13:03:14Z","receivedAt":"2011-05-26T13:03:14Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Ævar Arnfjörð Bjarmason venit, vidit, dixit 26.05.2011 01:33:\n> On Wed, May 25, 2011 at 11:55, Michael J Gruber\n> <git@drmicha.warpmail.net> wrote:\n> \n> I suppose it was inevitable that we'd end up maintaining this since\n> upstream only maintains the GPLv3 version now.\n> \n>>   /* Default values for command line options.  */\n>> -  unsigned short int show_variables = 0;\n>> +  /* unsigned short int show_variables = 0; */\n> \n>> -         show_variables = 1;\n>> +         /* show_variables = 1; */\n> \n> Can we just remove these lines instead of commenting them out?\n\nSure, I just didn't know what is more convenient for the maintainer. I\nnoticed a few comments in there already but have not compared with\nupstream. Resend necessary?\n\nMichael\n"},{"id":"168761","messageId":"BANLkTikmNxkCyAK1C4AWYVE-mjGYxKSLmQ@mail.gmail.com","threadId":"27452","inReplyTo":"4DDE4F92.7030301@drmicha.warpmail.net","subject":"Re: [PATCH] sh-18n: quell \"unused variable\" warning","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2011-05-26T13:46:00Z","receivedAt":"2011-05-26T13:46:00Z","isPatch":true,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"On Thu, May 26, 2011 at 15:03, Michael J Gruber\n<git@drmicha.warpmail.net> wrote:\n> Ævar Arnfjörð Bjarmason venit, vidit, dixit 26.05.2011 01:33:\n>> On Wed, May 25, 2011 at 11:55, Michael J Gruber\n>> <git@drmicha.warpmail.net> wrote:\n>>\n>> I suppose it was inevitable that we'd end up maintaining this since\n>> upstream only maintains the GPLv3 version now.\n>>\n>>>   /* Default values for command line options.  */\n>>> -  unsigned short int show_variables = 0;\n>>> +  /* unsigned short int show_variables = 0; */\n>>\n>>> -         show_variables = 1;\n>>> +         /* show_variables = 1; */\n>>\n>> Can we just remove these lines instead of commenting them out?\n>\n> Sure, I just didn't know what is more convenient for the maintainer. I\n> noticed a few comments in there already but have not compared with\n> upstream. Resend necessary?\n\nNo it's fine.\n\nBut I/we are the upstream for this program now, since GNU only\nmaintains the GPLv3 version.\n\nWe could just use that actually, since this is a stand-alone\nprogram. Or do we have intrinsic objections to GPLv3 code in our\nsource tree?\n"}]}