Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-14 Thread Daniel P . Berrangé
On Tue, Sep 14, 2021 at 03:28:12PM +0200, Tim Wiederhake wrote: > > Adding G_GNUC_UNUSED at the usage sites (of which there will be a > couple hundred), will disable unused variable detection irregardless of > used compiler, just to work around a bug in one single compiler. AFAIK, there is /no/

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-14 Thread Daniel P . Berrangé
On Tue, Sep 14, 2021 at 03:28:06PM +0200, Tim Wiederhake wrote: > On Fri, 2021-09-10 at 14:35 +0200, Ján Tomko wrote: > > On a Friday in 2021, Tim Wiederhake wrote: > > > Workaround for a bug in clang. Clang emits an unused-variable warning > > > if the variable is only accessed on scope exit by a

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-14 Thread Tim Wiederhake
On Fri, 2021-09-10 at 14:35 +0200, Ján Tomko wrote: > On a Friday in 2021, Tim Wiederhake wrote: > > Workaround for a bug in clang. Clang emits an unused-variable warning > > if the variable is only accessed on scope exit by a destructor > > function. > > Note that gcc does not exhibit this

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-14 Thread Tim Wiederhake
On Fri, 2021-09-10 at 13:33 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 10, 2021 at 02:26:32PM +0200, Tim Wiederhake wrote: > > On Fri, 2021-09-10 at 11:53 +0100, Daniel P. Berrangé wrote: > > > On Fri, Sep 10, 2021 at 12:45:43PM +0200, Tim Wiederhake wrote: > > > > Workaround for a bug in

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-10 Thread Ján Tomko
On a Friday in 2021, Tim Wiederhake wrote: Workaround for a bug in clang. Clang emits an unused-variable warning if the variable is only accessed on scope exit by a destructor function. Note that gcc does not exhibit this behavior. See https://bugs.llvm.org/show_bug.cgi?id=3888 and

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-10 Thread Daniel P . Berrangé
On Fri, Sep 10, 2021 at 02:26:32PM +0200, Tim Wiederhake wrote: > On Fri, 2021-09-10 at 11:53 +0100, Daniel P. Berrangé wrote: > > On Fri, Sep 10, 2021 at 12:45:43PM +0200, Tim Wiederhake wrote: > > > Workaround for a bug in clang. Clang emits an unused-variable > > > warning > > > if the variable

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-10 Thread Tim Wiederhake
On Fri, 2021-09-10 at 11:53 +0100, Daniel P. Berrangé wrote: > On Fri, Sep 10, 2021 at 12:45:43PM +0200, Tim Wiederhake wrote: > > Workaround for a bug in clang. Clang emits an unused-variable > > warning > > if the variable is only accessed on scope exit by a destructor > > function. > > Note

Re: [libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-10 Thread Daniel P . Berrangé
On Fri, Sep 10, 2021 at 12:45:43PM +0200, Tim Wiederhake wrote: > Workaround for a bug in clang. Clang emits an unused-variable warning > if the variable is only accessed on scope exit by a destructor function. > Note that gcc does not exhibit this behavior. > > See

[libvirt PATCH v2 01/12] glibcompat: Add G_GNUC_UNUSED to g_auto* definitions for clang

2021-09-10 Thread Tim Wiederhake
Workaround for a bug in clang. Clang emits an unused-variable warning if the variable is only accessed on scope exit by a destructor function. Note that gcc does not exhibit this behavior. See https://bugs.llvm.org/show_bug.cgi?id=3888 and https://bugs.llvm.org/show_bug.cgi?id=43482.