qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26
Date: Tue, 18 Jul 2017 08:23:51 +0100
User-agent: Mutt/1.8.3 (2017-05-23)

On Mon, Jul 17, 2017 at 12:29:08PM -0500, Eric Blake wrote:
> On 07/17/2017 11:46 AM, Dr. David Alan Gilbert wrote:
> 
> >> +++ 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).
> 
> How would it not help?  Are we using gcc 7 on windows builds?  Adding
> the assert is enough to shut up new gcc; old gcc was already silent; and
> if mingw is still on old gcc, it doesn't matter whether assert() is
> marked noreturn for what this patch is doing.

Mingw isn't using a fork of GCC anymore, its all mainline. Thus Fedora's
mingw gcc packages track native gcc packages. IOW i686-w64-mingw32-gcc
is already on version 7.1.0 in Fedora

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]