diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-04-10 20:29:54 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-04-10 20:29:54 +0000 |
commit | adaaf009b5bcef977ac8b3ca025b5357ee93aad6 (patch) | |
tree | e95fb7d1efa0e8a6ac40665459bcececd7844928 /sim/common | |
parent | aa0c8c1ae13d79f06b4539aa377561bc4f8cc202 (diff) | |
download | gdb-adaaf009b5bcef977ac8b3ca025b5357ee93aad6.zip gdb-adaaf009b5bcef977ac8b3ca025b5357ee93aad6.tar.gz gdb-adaaf009b5bcef977ac8b3ca025b5357ee93aad6.tar.bz2 |
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 <vapier@gentoo.org>
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/sim-fpu.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 89d238e..43c6251 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,10 @@ 2010-04-10 Mike Frysinger <vapier@gentoo.org> + * sim-fpu.c (sim_fpu_print_status): Add const markings to local + "prefix" var. + +2010-04-10 Mike Frysinger <vapier@gentoo.org> + * sim-fpu.c (sim_fpu_print_status): Remove duplicate break statements. 2010-04-10 Mike Frysinger <vapier@gentoo.org> diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index ad25f323e..7af6170 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)) |