sim: sh: fix a few compiler warnings
authorMike Frysinger <vapier@gentoo.org>
Sat, 29 May 2021 04:42:27 +0000 (00:42 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 29 May 2021 17:06:26 +0000 (13:06 -0400)
sim/sh/ChangeLog
sim/sh/interp.c

index de3cdef726173c2f108ff4adda8894776bd70c26..a6b243fb25236f0fcaf3dc3172642ed0a42c51df 100644 (file)
@@ -1,3 +1,8 @@
+2021-05-29  Mike Frysinger  <vapier@gentoo.org>
+
+       * interp.c (SET_RC): Add parenthesis.
+       (sim_open): Add const to p.
+
 2021-05-17  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-main.h (SIM_HAVE_COMMON_SIM_STATE): Delete.
index 652450357766b44e9200a16453455163549ac3ea..87fb863887f73ac8c678a492d7c6e2f9719d8663 100644 (file)
@@ -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
     {