All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: "Eric Blake" <eblake@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [Qemu-devel] Hacks for building on gcc 7 / Fedora 26
Date: Tue, 18 Jul 2017 13:59:52 -1000	[thread overview]
Message-ID: <d47138bd-1257-19c0-418e-4a4addf7fd8a@twiddle.net> (raw)
In-Reply-To: <39dc6b92-dd56-fe33-cd85-92c03d69f133@redhat.com>

On 07/17/2017 03:48 AM, Eric Blake 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));

Do you really need an assert there, or will

	(void)l; /* "used" */

work as well?  You didn't mention what the reported error is, so I'm guessing.


r~

  parent reply	other threads:[~2017-07-19  0:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-07 14:38 [Qemu-devel] Hacks for building on gcc 7 / Fedora 26 Dr. David Alan Gilbert
2017-04-07 19:21 ` Philippe Mathieu-Daudé
2017-07-13 13:07   ` Philippe Mathieu-Daudé
2017-07-17 13:42     ` Eric Blake
2017-07-17 13:48       ` Eric Blake
2017-07-17 14:16         ` Gerd Hoffmann
2017-07-17 15:04           ` Eric Blake
2017-07-17 16:46         ` Dr. David Alan Gilbert
2017-07-17 17:22           ` Peter Maydell
2017-07-17 17:29           ` Eric Blake
2017-07-17 17:36             ` Peter Maydell
2017-07-17 18:10               ` Eric Blake
2017-07-17 18:48                 ` Dr. David Alan Gilbert
2017-07-18 15:04               ` Philippe Mathieu-Daudé
2017-07-18 15:10                 ` Eric Blake
2017-07-19  7:15                   ` Thomas Huth
2017-07-17 17:46             ` Dr. David Alan Gilbert
2017-07-18  7:23             ` Daniel P. Berrange
2017-07-18 12:35               ` Eric Blake
2017-07-18 12:56                 ` Daniel P. Berrange
2017-07-18 23:59         ` Richard Henderson [this message]
2017-07-19  0:34           ` Eric Blake
2017-04-12 23:54 ` no-reply
2017-07-20 10:50 ` Daniel P. Berrange
2017-07-20 12:10   ` Eric Blake
2017-07-20 16:15   ` Dr. David Alan Gilbert
2017-07-20 16:47     ` Daniel P. Berrange
2017-07-20 17:04       ` Dr. David Alan Gilbert
2017-07-20 17:06         ` Daniel P. Berrange
2017-07-20 18:36           ` Eric Blake

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d47138bd-1257-19c0-418e-4a4addf7fd8a@twiddle.net \
    --to=rth@twiddle.net \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.