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>
This commit is contained in:
Mike Frysinger 2010-04-10 20:29:54 +00:00
parent aa0c8c1ae1
commit adaaf009b5
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,8 @@
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.

View file

@ -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))