[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches |
Date: |
Thu, 2 May 2019 14:05:16 +0100 |
On Thu, 2 May 2019 at 08:54, Gerd Hoffmann <address@hidden> 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
- [Qemu-devel] [PULL 0/7] Usb 20190502 patches, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 1/7] usb-mtp: fix string length for filename when writing metadata, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 2/7] usb-mtp: fix alignment of access of ObjectInfo filename field, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 5/7] hw/usb/hcd-ohci: Do not use PCI functions with sysbus devices in ohci_die(), Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 4/7] usb/xhci: avoid trigger assertion if guest write wrong epid, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 6/7] hw/usb/hcd-ohci: Move PCI-related code into a separate file, Gerd Hoffmann, 2019/05/02
- [Qemu-devel] [PULL 3/7] usb-mtp: change default to success for usb_mtp_update_object, Gerd Hoffmann, 2019/05/02
- Re: [Qemu-devel] [PULL 0/7] Usb 20190502 patches,
Peter Maydell <=