git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Simple dead assignment

From
CWChris Wilson <cwilson@vigilantsw.com>
Date
May 24, 2011, 22:45 UTC
Message-ID
<20110524224525.GI16052@localhost>
In-Reply-To
<20110524210758.GH16052@localhost>
On Tue, May 24, 2011 at 05:07:58PM -0400, Chris Wilson wrote:
> Sentry picked up this dead assignment commited yesterday in ba67aaf.
> I've provided a patch to remove it. It might also be a good idea to
> ask the author if that value was supposed to be used for something
> in particular before pulling it out.
Oops, I see others putting the patches inline. Here you go.
Chris
-- 
Chris Wilson
http://vigilantsw.com/
Vigilant Software, LLC

diff --git a/sh-i18n--envsubst.c b/sh-i18n--envsubst.c
index 7125093..5829463 100644
--- a/sh-i18n--envsubst.c
+++ b/sh-i18n--envsubst.c
@@ -67,9 +67,6 @@ static void subst_from_stdin (void);
 int
 main (int argc, char *argv[])
 {
-  /* Default values for command line options.  */
-  unsigned short int show_variables = 0;
-
   switch (argc)
 	{
 	case 1:
@@ -88,7 +85,6 @@ 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;
       print_variables (argv[2]);
 	  break;
 	default:
Previous: Chris WilsonNext: Matthieu Moy
Message 2 of 10 in “Simple dead assignment”
  1. Chris WilsonMay 24, 2011
  2. Simple dead assignmentChris Wilson, May 24, 2011
  3. Matthieu MoyMay 25, 2011
  4. Remove a dead assignmentChris Wilson, May 25, 2011
  5. Matthieu MoyMay 25, 2011
  6. Michael SchubertMay 25, 2011
  7. Remove a dead assignmentChris Wilson, May 25, 2011
  8. Junio C HamanoMay 25, 2011
  9. Junio C HamanoMay 25, 2011
  10. Jeff KingMay 25, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.