]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
sim: Fix cc -Werror=shadow=local in cr16/simops.c
authorMark Wielaard <mark@klomp.org>
Sun, 21 Jan 2024 22:52:50 +0000 (23:52 +0100)
committerMark Wielaard <mark@klomp.org>
Mon, 22 Jan 2024 11:04:49 +0000 (12:04 +0100)
commit865e469c6024b3aa5266092597bf7d00166f5049
tree3ff34b196a776f78ebfda8c625a2cff50137307b
parent06ceae57ed4031e8a11ad7556684e1ac83477d73
sim: Fix cc -Werror=shadow=local in cr16/simops.c

include/opcode/cr16.h defines cc as an enum value, which causes GCC 14
to warn

sim/cr16/simops.c: In function ‘cond_stat’:
sim/cr16/simops.c:138:26: error: declaration of ‘cc’ shadows a previous local [-Werror=shadow=local]
  138 | static int cond_stat(int cc)
      |                      ~~~~^~
In file included from ../../binutils-gdb/sim/cr16/cr16-sim.h:26,
                 from ../../binutils-gdb/sim/cr16/simops.c:39:
sim/../include/opcode/cr16.h:149:3: note: shadowed declaration is here
  149 |   cc,
      |   ^~

Fix this by renaming cc in cr16/simops.c to cond.
sim/cr16/simops.c