mirror_qemu/hw
Philippe Mathieu-Daudé 9cbb8eca17 hw/acpi: Use QEMU_NONSTRING for non NUL-terminated arrays
GCC 8 added a -Wstringop-truncation warning:

  The -Wstringop-truncation warning added in GCC 8.0 via r254630 for
  bug 81117 is specifically intended to highlight likely unintended
  uses of the strncpy function that truncate the terminating NUL
  character from the source string.

This new warning leads to compilation failures:

    CC      hw/acpi/core.o
  In function 'acpi_table_install', inlined from 'acpi_table_add' at qemu/hw/acpi/core.c:296:5:
  qemu/hw/acpi/core.c:184:9: error: 'strncpy' specified bound 4 equals destination size [-Werror=stringop-truncation]
           strncpy(ext_hdr->sig, hdrs->sig, sizeof ext_hdr->sig);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  make: *** [qemu/rules.mak:69: hw/acpi/core.o] Error 1

Use the QEMU_NONSTRING attribute, since ACPI tables don't require the
strings to be NUL-terminated.

Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
2019-01-17 21:10:57 -05:00
..
9pfs xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
acpi hw/acpi: Use QEMU_NONSTRING for non NUL-terminated arrays 2019-01-17 21:10:57 -05:00
adc Include qapi/error.h exactly where needed 2018-02-09 13:50:17 +01:00
alpha avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
arm avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
audio hw/audio/marvell: Don't include unnecessary i2c.h header file 2019-01-10 09:51:42 +01:00
block qemu: avoid memory leak while remove disk 2019-01-14 19:31:04 -05:00
bt hw/bt: Replace fprintf(stderr, "*\n" with error_report() 2018-01-22 09:51:00 +01:00
char xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
core tpm: add a "ppi" boolean property 2019-01-17 21:10:57 -05:00
cpu hw/cpu: introduce CPU clusters 2019-01-07 15:23:45 +00:00
cris hw/cris: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
display virtio: split virtio gpu bits from virtio-pci.h 2019-01-17 21:10:57 -05:00
dma avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
gpio avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
hppa hw/hppa/dino: Remove unuseful code 2018-10-24 06:44:59 -03:00
hyperv hw/hyperv: fix NULL dereference with pure-kvm SynIC 2018-11-26 14:14:38 -02:00
i2c i2c-ddc: fix oob read 2019-01-11 11:45:00 +01:00
i386 acpi: build TPM Physical Presence interface 2019-01-17 21:10:57 -05:00
ide avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
input avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
intc avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
ipack hw/ipack: Use the IEC binary prefix definitions 2018-07-02 15:41:12 +02:00
ipmi ipmi: Use proper struct reference for BT vmstate 2018-08-23 18:46:25 +02:00
isa configs: Add a CONFIG_SMC37C669 switch for the "smc37c669-superio" device 2018-10-24 07:33:44 +01:00
lm32 milkymist: Check for failure trying to load BIOS image 2018-11-06 11:32:14 +00:00
m68k hw/m68k: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
mem memory-device: rewrite address assignment using ranges 2019-01-09 22:09:31 -02:00
microblaze Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
mips avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
misc hw/misc/edu: add msi_uninit() for pci_edu_uninit() 2019-01-17 21:10:57 -05:00
moxie trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
net virtio-net: changed VIRTIO_NET_F_RSC_EXT to be 61 2019-01-17 21:10:57 -05:00
nios2 Support u-boot noload images for arm as used by, NetBSD/evbarm GENERIC kernel. 2019-01-07 15:46:20 +00:00
nvram trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
openrisc Change references to serial_hds[] to serial_hd() 2018-04-26 13:57:00 +01:00
pci msix: make pba size math more uniform 2019-01-14 19:31:04 -05:00
pci-bridge pci/shpc: perform unplug via the hotplug handler 2018-12-20 11:19:12 -05:00
pci-host pam: wrap MemoryRegion initialization in a transaction 2019-01-11 13:57:23 +01:00
pcmcia
ppc * HAX support for Linux hosts (Alejandro) 2019-01-11 15:46:09 +00:00
rdma pvrdma: check return value from pvrdma_idx_ring_has_ routines 2018-12-22 11:09:57 +02:00
riscv sifive_uart: Implement interrupt pending register 2018-12-20 12:08:43 -08:00
s390x machine: Use shorter format for GlobalProperty arrays 2019-01-09 22:10:00 -02:00
scsi qemu: avoid memory leak while remove disk 2019-01-14 19:31:04 -05:00
sd hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize() 2018-12-14 13:30:54 +00:00
sh4 avoid TABs in files that only contain a few 2019-01-11 15:46:56 +01:00
smbios hw/smbios: Move to the hw/firmware/ subdirectory 2018-12-19 16:48:16 -05:00
sparc trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
sparc64 hw/sparc64/niagara: Model the I/O Bridge with the 'unimplemented_device' 2018-10-24 06:44:59 -03:00
ssi hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init 2018-10-24 06:44:59 -03:00
timer trivial: Don't include isa.h if it is not really necessary 2019-01-09 11:24:35 +01:00
tpm tpm: clear RAM when "memory overwrite" requested 2019-01-17 21:10:57 -05:00
tricore hw/tricore: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
unicore32 hw/input/i8042: Extract declarations from i386/pc.h into input/i8042.h 2018-03-12 16:12:48 +01:00
usb xen: re-name XenDevice to XenLegacyDevice... 2019-01-14 13:45:40 +00:00
vfio qemu/queue.h: typedef QTAILQ heads 2019-01-11 15:46:55 +01:00
virtio virtio: split virtio crypto bits from virtio-pci.h 2019-01-17 21:10:57 -05:00
watchdog hw/watchdog/wdt_i6300esb: remove a unnecessary comment 2019-01-11 15:46:55 +01:00
xen xen: automatically create XenBlockDevice-s 2019-01-14 13:45:40 +00:00
xenpv xen: Replace few mentions of xend by libxl 2019-01-14 13:45:40 +00:00
xtensa target/xtensa: xtfpga: provide default memory sizes 2018-11-21 10:53:21 -08:00
Makefile.objs memory-device: introduce separate config option 2018-10-24 06:44:59 -03:00