[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26 |
Date: |
Mon, 17 Jul 2017 12:29:08 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
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.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- 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, 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 <=
- 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
- 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, Daniel P. Berrange, 2017/07/18