]> 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, 17 Nov 2008 15:36:28 +0000 (10:36 -0500)
* src/getargs.c (getargs): Don't assign const address to non-const
pointer.

ChangeLog
src/getargs.c

index 46f1add68674005baa25444e78533058ee60fa7d..6796f5c029afd0f9124448ba2d0bc3d8a04694c0 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  Joel E. Denny  <jdenny@ces.clemson.edu>
 
        Don't let maintainer-*-check targets force a version update.
index 6b748c8b421ce934882f5e9a2aa2aee46e46a8aa..bc1cc64b3cc7cbf6464887b4da7880096e9d0625 100644 (file)
@@ -529,11 +529,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;