[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26
From: |
Dr. David Alan Gilbert |
Subject: |
Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26 |
Date: |
Mon, 17 Jul 2017 17:46:41 +0100 |
User-agent: |
Mutt/1.8.3 (2017-05-23) |
* Eric Blake (address@hidden) wrote:
> On 07/17/2017 08:42 AM, Eric Blake wrote:
> > On 07/13/2017 08:07 AM, Philippe Mathieu-Daudé wrote:
> >> On 04/07/2017 04:21 PM, Philippe Mathieu-Daudé wrote:
> >>> Hi Dave,
> >>>
> >>> On 04/07/2017 11:38 AM, Dr. David Alan Gilbert wrote:
> >>>> Hi,
> >>>> Fedora 26 has gcc 7.0.1 which has the normal compliment
> >>>> of new fussy warnings; so far I've posted :
> >>>>
> >>>> tests/check-qdict: Fix missing brackets
> >>>> slirp/smb: Replace constant strings by glib string
> >>>>
> >>>> that fix one actual mistake and work around something it's being
> >>>> fussy over.
> >>>>
> >>>> But I've also got a pile of hacks, attached below that I'm
> >>>> not too sure what I'll do with them yet, but they're attached
> >>
> >> ping ... What do we do with them?
> >
> > Well, now that I've upgraded to the just-released Fedora 26, it is now
> > mainline gcc and affecting my builds. So we should really try and find
> > patches that silence the warnings (although it counts as bug fixes, so
> > it won't hurt if it doesn't make tomorrow's freeze deadline).
>
> FWIW, most of these have been fixed in the meantime; the only remaining
> hack I had to add was:
>
> diff --git i/hw/usb/bus.c w/hw/usb/bus.c
> index 5939b273b9..bce011058b 100644
> --- i/hw/usb/bus.c
> +++ w/hw/usb/bus.c
> @@ -407,8 +407,9 @@ void usb_register_companion(const char *masterbus,
> USBPort *ports[],
> void usb_port_location(USBPort *downstream, USBPort *upstream, int portnr)
> {
> if (upstream) {
> - snprintf(downstream->path, sizeof(downstream->path), "%s.%d",
> - upstream->path, portnr);
> + int l = snprintf(downstream->path, sizeof(downstream->path),
> "%s.%d",
> + upstream->path, portnr);
> + assert(l < sizeof(downstream->path));
You may find this doesn't help in some windows builds; the assert
functions aren't always marked as noreturn (because they pop up a dialog
that asks you whether you want to run into a debugger etc).
Dave
> downstream->hubcount = upstream->hubcount + 1;
> } else {
> snprintf(downstream->path, sizeof(downstream->path), "%d", portnr);
>
> Gerd, MAINTAINERS lists you; can you come up with something more robust?
>
> --
> Eric Blake, Principal Software Engineer
> Red Hat, Inc. +1-919-301-3266
> Virtualization: qemu.org | libvirt.org
>
--
Dr. David Alan Gilbert / address@hidden / Manchester, UK
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Philippe Mathieu-Daudé, 2017/07/13
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Eric Blake, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Eric Blake, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26,
Dr. David Alan Gilbert <=
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Peter Maydell, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Eric Blake, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Peter Maydell, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Eric Blake, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Dr. David Alan Gilbert, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Philippe Mathieu-Daudé, 2017/07/18
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Eric Blake, 2017/07/18
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Thomas Huth, 2017/07/19
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Dr. David Alan Gilbert, 2017/07/17
- Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26, Daniel P. Berrange, 2017/07/18