From 3dd6860550ed99ae98766701eb29703c0fd3553e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 10 Apr 2010 07:35:35 +0000 Subject: 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 --- sim/common/sim-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/common/sim-options.c') diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index 571b292..a37dca9 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -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; -- cgit v1.1