[Top][All Lists]

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

Re: [PATCH] build: Silence clang warning on older glib autoptr usage

From: John Snow
Subject: Re: [PATCH] build: Silence clang warning on older glib autoptr usage
Date: Wed, 18 Mar 2020 13:18:42 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 3/18/20 8:55 AM, Eric Blake wrote:
> On 3/17/20 1:11 PM, Peter Maydell wrote:
>> On Tue, 17 Mar 2020 at 17:55, Eric Blake <address@hidden> 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 <address@hidden>
>>> Signed-off-by: Eric Blake <address@hidden>
>>> ---
>>> 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.

OK, thanks -- I'm going to take this patch and re-send the PR.

reply via email to

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