On Thu, 2 May 2019 at 08:54, Gerd Hoffmann <kra...@redhat.com> wrote: > > The following changes since commit f75d15231e56cb0f2bafe19faf1229c459a60731: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2019-04-30 17:06:57 +0100) > > are available in the Git repository at: > > git://git.kraxel.org/qemu tags/usb-20190502-pull-request > > for you to fetch changes up to f3ea801df82991e852862bcaede23a4607859dd8: > > hw/usb: avoid format truncation warning when formatting port name > (2019-05-02 09:34:13 +0200) > > ---------------------------------------------------------------- > usb: bugfixes for mtp and xhci, split ohci-pci. > > ----------------------------------------------------------------
Hi -- I'm afraid this failed to compile on one of my systems: CC hw/usb/hcd-xhci.o /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3340:66: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 5 [-Werror=format-truncation=] snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1); ^~ /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3340:54: note: directive argument in the range [-2147483647, 30] snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1); ^~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:862:0, from /home/petmay01/linaro/qemu-for-merges/include/qemu/osdep.h:99, from /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:21: /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 13 and 23 bytes into a destination of size 16 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3354:66: error: ‘%d’ directive output may be truncated writing between 1 and 11 bytes into a region of size 5 [-Werror=format-truncation=] snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1); ^~ /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:3354:54: note: directive argument in the range [-2147483647, 30] snprintf(port->name, sizeof(port->name), "usb3 port #%d", i+1); ^~~~~~~~~~~~~~~ In file included from /usr/include/stdio.h:862:0, from /home/petmay01/linaro/qemu-for-merges/include/qemu/osdep.h:99, from /home/petmay01/linaro/qemu-for-merges/hw/usb/hcd-xhci.c:21: /usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 13 and 23 bytes into a destination of size 16 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors It looks like this compiler isn't able to decide that i is definitely not negative, so it thinks the resulting string might not fit. thanks -- PMM