diff options
author | Tom de Vries <tdevries@suse.de> | 2021-05-19 19:08:53 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-05-19 19:08:53 +0200 |
commit | 17bb1d80f5f7a4e5894939d994972878ba95f5b7 (patch) | |
tree | aa48c125e0484c02f470919e1b4e819a3e3042b8 /sim/ppc | |
parent | bfff0efb3d8283a48825abc1701bb39a56d223c5 (diff) | |
download | fsf-binutils-gdb-17bb1d80f5f7a4e5894939d994972878ba95f5b7.zip fsf-binutils-gdb-17bb1d80f5f7a4e5894939d994972878ba95f5b7.tar.gz fsf-binutils-gdb-17bb1d80f5f7a4e5894939d994972878ba95f5b7.tar.bz2 |
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.
Diffstat (limited to 'sim/ppc')
-rw-r--r-- | sim/ppc/hw_phb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c index 70d59d3..a3c1926 100644 --- a/sim/ppc/hw_phb.c +++ b/sim/ppc/hw_phb.c @@ -312,8 +312,8 @@ hw_phb_attach_address(device *me, || addr < pci_space->my_base) device_error(me, "attach addr (0x%lx) specified by %s outside of bus address range", (unsigned long)addr, device_path(client)); - if (type != hw_phb_normal_decode - && type != hw_phb_subtractive_decode) + if ((hw_phb_decode)type != hw_phb_normal_decode + && (hw_phb_decode)type != hw_phb_subtractive_decode) device_error(me, "attach type (%d) specified by %s invalid", type, device_path(client)); /* attach it to the relevent bus */ |