Bug 32532 - Warning: variable ret never used in writeargv
Summary: Warning: variable ret never used in writeargv
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.3.0
: P3 trivial
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-28 02:04 UTC by nightstrike
Modified: 2007-07-02 17:54 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: x86_64-pc-mingw32
Build: x86_64-unknown-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nightstrike 2007-06-28 02:04:17 UTC
In libiberty/argv.c line 313, function writeargv(), the line "int ret" declares a variable that is never used in that function.  This triggers a warning during compilation.  The following patch should remove that line:

Index: libiberty/argv.c
===================================================================
--- libiberty/argv.c    (revision 126005)
+++ libiberty/argv.c    (working copy)
@@ -310,7 +310,6 @@ writeargv (char **argv, FILE *f)

  while (*argv != NULL)
    {
-      int ret;
      const char *arg = *argv;

      while (*arg != EOS)
Comment 1 DJ Delorie 2007-06-28 02:09:00 UTC
Ok to commit it.
Comment 2 Andrew Pinski 2007-07-02 17:54:22 UTC
Fixed by:
2007-07-02  Simon Baldwin <simonb@google.com>

        * argv.c (writeargv): Removed declaration of unused variable.