Fix last warning from --enable-gcc-warnings.

* src/getargs.c (getargs): Don't assign const address to non-const
pointer.
(cherry picked from commit a8beef7e6a)
This commit is contained in:
Joel E. Denny
2009-04-06 04:28:51 -04:00
parent 6f5be1abf7
commit 10fa0146e2
2 changed files with 13 additions and 4 deletions
+6
View File
@@ -1,3 +1,9 @@
2008-11-17 Joel E. Denny <[email protected]>
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 <[email protected]> 2008-11-17 Di-an Jan <[email protected]>
Handle --enable-gcc-warnings. Handle --enable-gcc-warnings.
+7 -4
View File
@@ -527,11 +527,14 @@ getargs (int argc, char *argv[])
{ {
char* name = optarg; char* name = optarg;
char* value = strchr (optarg, '='); char* value = strchr (optarg, '=');
char const * muscle_value = "";
if (value) if (value)
*value++ = 0; {
else *value++ = 0;
value = ""; muscle_value = value;
muscle_percent_define_insert (name, command_line_location (), value); }
muscle_percent_define_insert (name, command_line_location (),
muscle_value);
} }
break; break;