aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-options.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-04-10 07:35:35 +0000
committerMike Frysinger <vapier@gentoo.org>2010-04-10 07:35:35 +0000
commit3dd6860550ed99ae98766701eb29703c0fd3553e (patch)
tree1a87e867efba198bc87f88e1dbf723dfcd0577dd /sim/common/sim-options.c
parentfcfd64c2cc074718773e6042aa0e36c8c685ce48 (diff)
downloadgdb-3dd6860550ed99ae98766701eb29703c0fd3553e.zip
gdb-3dd6860550ed99ae98766701eb29703c0fd3553e.tar.gz
gdb-3dd6860550ed99ae98766701eb29703c0fd3553e.tar.bz2
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>
Diffstat (limited to 'sim/common/sim-options.c')
-rw-r--r--sim/common/sim-options.c2
1 files changed, 1 insertions, 1 deletions
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;