From adaaf009b5bcef977ac8b3ca025b5357ee93aad6 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 10 Apr 2010 20:29:54 +0000 Subject: [PATCH] sim: constify sim_fpu_print_status I've committed the following patch as obvious. The local "prefix" variable is only assigned const strings, and only passed to printf() functions, so add "const" to avoid gcc warnings: common/sim-fpu.c: In function 'sim_fpu_print_status': common/sim-fpu.c:2508: warning: initialization discards qualifiers from pointer target type common/sim-fpu.c:2566: warning: assignment discards qualifiers from pointer target type Signed-off-by: Mike Frysinger --- sim/common/ChangeLog | 5 +++++ sim/common/sim-fpu.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 89d238efe4d..43c625131f3 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,8 @@ +2010-04-10 Mike Frysinger + + * sim-fpu.c (sim_fpu_print_status): Add const markings to local + "prefix" var. + 2010-04-10 Mike Frysinger * sim-fpu.c (sim_fpu_print_status): Remove duplicate break statements. diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index ad25f323e11..7af617067cf 100644 --- a/sim/common/sim-fpu.c +++ b/sim/common/sim-fpu.c @@ -2497,7 +2497,7 @@ sim_fpu_print_status (int status, void *arg) { int i = 1; - char *prefix = ""; + const char *prefix = ""; while (status >= i) { switch ((sim_fpu_status) (status & i)) -- 2.30.2