sim: ppc: fix some Wenum-compare warnings
authorTom de Vries <tdevries@suse.de>
Wed, 19 May 2021 17:08:53 +0000 (19:08 +0200)
committerTom de Vries <tdevries@suse.de>
Wed, 19 May 2021 17:08:53 +0000 (19:08 +0200)
commit17bb1d80f5f7a4e5894939d994972878ba95f5b7
treeaa48c125e0484c02f470919e1b4e819a3e3042b8
parentbfff0efb3d8283a48825abc1701bb39a56d223c5
sim: ppc: fix some Wenum-compare warnings

When compiling with --enable-werror and CFLAGS="-O0 -g -Wall", we run into:
...
src/sim/ppc/hw_phb.c: In function 'hw_phb_attach_address':
src/sim/ppc/hw_phb.c:315:12: error: comparison between \
  'attach_type {aka enum _attach_type}' and \
  'enum <anonymous>' [-Werror=enum-compare]
   if (type != hw_phb_normal_decode
            ^~
...

Fix this by casting type to hw_phb_decode.
sim/ppc/hw_phb.c