[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHC9VhQEyA6iy84j=Bryvxwp7EYVN2JibTqMmWHk_hTs6Kkadg@mail.gmail.com>
Date: Wed, 24 Mar 2021 12:14:12 -0400
From: Paul Moore <paul@...l-moore.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: Eric Paris <eparis@...hat.com>, Arnd Bergmann <arnd@...db.de>,
Richard Guy Briggs <rgb@...hat.com>,
Jules Irenge <jbi.octave@...il.com>, linux-audit@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] [v2] audit: avoid -Wempty-body warning
On Mon, Mar 22, 2021 at 12:28 PM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> gcc warns about an empty statement when audit_remove_mark is defined to
> nothing:
>
> kernel/auditfilter.c: In function 'audit_data_to_entry':
> kernel/auditfilter.c:609:51: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
> 609 | audit_remove_mark(entry->rule.exe); /* that's the template one */
> | ^
>
> Change the macros to use the usual "do { } while (0)" instead, and change a
> few more that were (void)0, for consistency.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> v2: convert two more macros
> ---
> kernel/audit.h | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
Merged into audit/next, thanks.
--
paul moore
www.paul-moore.com
Powered by blists - more mailing lists