[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: Peter Maydell
Subject: Re: [PATCH] build: Silence clang warning on older glib autoptr usage
Date: Tue, 17 Mar 2020 18:11:22 +0000

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.)

The ubuntu setup is libglib 2.56.4-0ubuntu0.18.04.4 and
clang 6.0.0-1ubuntu2.

-- PMM

reply via email to

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