From cd7caae65175a8ea1149cae7dcf11948f4933d1b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 29 May 2021 00:42:27 -0400 Subject: [PATCH] sim: sh: fix a few compiler warnings --- sim/sh/ChangeLog | 5 +++++ sim/sh/interp.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index de3cdef7261..a6b243fb252 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,8 @@ +2021-05-29 Mike Frysinger + + * interp.c (SET_RC): Add parenthesis. + (sim_open): Add const to p. + 2021-05-17 Mike Frysinger * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete. diff --git a/sim/sh/interp.c b/sim/sh/interp.c index 65245035776..87fb863887f 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -214,7 +214,7 @@ do { \ #define SET_RC(x) \ (saved_state.asregs.cregs.named.sr \ - = saved_state.asregs.cregs.named.sr & 0xf000ffff | ((x) & 0xfff) << 16) + = (saved_state.asregs.cregs.named.sr & 0xf000ffff) | ((x) & 0xfff) << 16) /* Manipulate FPSCR */ @@ -2345,7 +2345,7 @@ SIM_DESC sim_open (SIM_OPEN_KIND kind, host_callback *cb, struct bfd *abfd, char * const *argv) { - char **p; + char * const *p; int i; union { -- 2.30.2