On 20 Oct 2022 09:32, Tsukasa OI wrote: > 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), this assumes the enums attach_type & hw_phb_decode are the same. they aren't. so this looks like a real bug, and adding a cast covers it up. we should fix the bug. -mike