qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Daniel P. Berrange" <berrange@redhat.com>,
	John Snow <jsnow@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] build: Silence clang warning on older glib autoptr usage
Date: Wed, 18 Mar 2020 07:55:08 -0500	[thread overview]
Message-ID: <f2b2f264-c2ab-054f-82b5-038a7fd251dd@redhat.com> (raw)
In-Reply-To: <CAFEAcA8qGWhvoRwT1Wcg6RTWONG7gVSzGbhCFtG-AgQYwZHyQA@mail.gmail.com>

On 3/17/20 1:11 PM, Peter Maydell wrote:
> On Tue, 17 Mar 2020 at 17:55, Eric Blake <eblake@redhat.com> wrote:
>>
>> glib's G_DEFINE_AUTOPTR_CLEANUP_FUNC() macro defines several static
>> inline functions, often with some of them unused, but prior to 2.57.2
>> did not mark the functions as such.  As a result, clang (but not gcc)
>> fails to build with older glib unless -Wno-unused-function is enabled.
>>
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> ---
>>
>> Half-tested: I proved to myself that this does NOT enable
>> -Wno-unused-function on my setup of glib 2.62.5 and gcc 9.2.1 (Fedora
>> 31), but would do so if I introduced an intentional compile error into
>> the sample program; but Iwas unable to test that it would prevent the
>> build failure encountered by Peter on John's pull request (older glib
>> but exact version unknown, clang, on NetBSD).
> 
> This wasn't a NetBSD failure. I hit it on my clang-on-x86-64-Ubuntu
> setup, and also on FreeBSD. (The latter is just the tests/vm
> FreeBSD config, so you can repro that if you need to.)

Not sure where I got NetBSD from (maybe because the build failure 
happened in a file with 'nbd' in the name and I gravitated to the 'n'?). 
  But now that I've re-read your replies to the pull request, I'm glad 
to state that my mistake on reproduction platform is confined to the 
part after the ---; the commit message itself is accurate as-is.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  parent reply	other threads:[~2020-03-18 12:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-17 17:55 [PATCH] build: Silence clang warning on older glib autoptr usage Eric Blake
2020-03-17 18:01 ` John Snow
2020-03-17 18:11 ` Peter Maydell
2020-03-18 11:19   ` Eric Blake
2020-03-18 12:45     ` Eric Blake
2020-03-18 12:55   ` Eric Blake [this message]
2020-03-18 17:18     ` John Snow

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=f2b2f264-c2ab-054f-82b5-038a7fd251dd@redhat.com \
    --to=eblake@redhat.com \
    --cc=berrange@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).