Skip to content

maybe-uninitialized warning in pnv_phb3_translate_iommu()

As of v6.1.0 on Alpine Linux:

C compiler for the host machine: gcc (gcc 10.3.1 "gcc (Alpine 10.3.1_git20210625) 10.3.1 20210625")
...
[2945/7569] Compiling C object libqemu-ppc64-softmmu.fa.p/hw_pci-host_pnv_phb3.c.o
In file included from ../hw/pci-host/pnv_phb3.c:10:
../hw/pci-host/pnv_phb3.c: In function 'pnv_phb3_translate_iommu':
/home/mps/aports/community/qemu/src/qemu-6.1.0/include/qemu/log.h:120:13: warning: 'taddr' may be used uninitialized in this function [-Wmaybe-uninitialized]
  120 |             qemu_log(FMT, ## __VA_ARGS__);              \
      |             ^~~~~~~~
../hw/pci-host/pnv_phb3.c:772:24: note: 'taddr' was declared here
  772 |         uint64_t base, taddr, tce, tce_mask;
      |                        ^~~~~

Reported on IRC by @mps-x.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information