mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
sim: add const markings to env string
The sim-options code assigns a const string to "char *" in decoding the current environment settings, and only uses it to pass to a printf. GCC outputs the warnings: common/sim-options.c: In function 'standard_option_handler': common/sim-options.c:271: warning: assignment discards qualifiers from pointer target type common/sim-options.c:272: warning: assignment discards qualifiers from pointer target type common/sim-options.c:273: warning: assignment discards qualifiers from pointer target type So I've committed this as "obvious". Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
@ -265,7 +265,7 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
|
||||
if (WITH_ENVIRONMENT != ALL_ENVIRONMENT
|
||||
&& WITH_ENVIRONMENT != STATE_ENVIRONMENT (sd))
|
||||
{
|
||||
char *type;
|
||||
const char *type;
|
||||
switch (WITH_ENVIRONMENT)
|
||||
{
|
||||
case USER_ENVIRONMENT: type = "user"; break;
|
||||
|
Reference in New Issue
Block a user