]> git.saurik.com Git - bison.git/commitdiff
Fix last warning from --enable-gcc-warnings.
authorJoel E. Denny <jdenny@ces.clemson.edu>
Mon, 17 Nov 2008 15:36:28 +0000 (10:36 -0500)
committerJoel E. Denny <jdenny@ces.clemson.edu>
Mon, 6 Apr 2009 08:28:51 +0000 (04:28 -0400)
* src/getargs.c (getargs): Don't assign const address to non-const
pointer.
(cherry picked from commit a8beef7e6a9f6b75fa249d59b4c79585190540b6)

ChangeLog
src/getargs.c

index e4c83d24529235ce20a5e60669bfbb268cbbe954..dcfd0a5a3a8d8f63f38e2d47ed299b38c64dc99d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-17  Joel E. Denny  <jdenny@ces.clemson.edu>
+
+       Fix last warning from --enable-gcc-warnings.
+       * src/getargs.c (getargs): Don't assign const address to non-const
+       pointer.
+
 2008-11-17  Di-an Jan  <dianj@freeshell.org>
 
        Handle --enable-gcc-warnings.
index 45557733c6c5770168aea0cf5516883f98f8cd04..fddc023b33b6f979907009951ba2490e5b80b059 100644 (file)
@@ -527,11 +527,14 @@ getargs (int argc, char *argv[])
         {
           char* name = optarg;
           char* value = strchr (optarg, '=');
+          char const * muscle_value = "";
           if (value)
-            *value++ = 0;
-          else
-            value = "";
-          muscle_percent_define_insert (name, command_line_location (), value);
+            {
+              *value++ = 0;
+              muscle_value = value;
+            }
+          muscle_percent_define_insert (name, command_line_location (),
+                                        muscle_value);
         }
        break;