[PATCH 32/40] sim/ppc: Add an explicit cast
Tsukasa OI
research_trasio@irq.a4lg.com
Thu Oct 20 09:32:37 GMT 2022
Clang generates a warning if there is an enum value with a mismatching type
without an explicit cast ("-Wenum-conversion").
On the default configuration, it causes a build failure
(unless "--disable-werror" is specified).
This commit adds an explicit cast to hw_phb_decode type.
---
sim/ppc/hw_phb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c
index a3c19264235..a99a51d9cf9 100644
--- a/sim/ppc/hw_phb.c
+++ b/sim/ppc/hw_phb.c
@@ -319,7 +319,7 @@ hw_phb_attach_address(device *me,
/* attach it to the relevent bus */
DTRACE(phb, ("attach %s - %s %s:0x%lx (0x%lx bytes)\n",
device_path(client),
- hw_phb_decode_name(type),
+ hw_phb_decode_name((hw_phb_decode)type),
pci_space->name,
(unsigned long)addr,
(unsigned long)nr_bytes));
--
2.34.1
More information about the Gdb-patches
mailing list