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
2008-11-17 10:36:28 -05:00
parent 6f5be1abf7
commit 10fa0146e2
2 changed files with 13 additions and 4 deletions

View File

@@ -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> 2008-11-17 Di-an Jan <dianj@freeshell.org>
Handle --enable-gcc-warnings. Handle --enable-gcc-warnings.

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;