From: Paul Moore <paul@paul-moore.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jules Irenge <jbi.octave@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Richard Guy Briggs <rgb@redhat.com>,
linux-kernel@vger.kernel.org, linux-audit@redhat.com
Subject: Re: [PATCH] [v2] audit: avoid -Wempty-body warning
Date: Wed, 24 Mar 2021 12:14:12 -0400 [thread overview]
Message-ID: <CAHC9VhQEyA6iy84j=Bryvxwp7EYVN2JibTqMmWHk_hTs6Kkadg@mail.gmail.com> (raw)
In-Reply-To: <20210322162807.679370-1-arnd@kernel.org>
On Mon, Mar 22, 2021 at 12:28 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.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@arndb.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
--
Linux-audit mailing list
Linux-audit@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-audit
prev parent reply other threads:[~2021-03-24 16:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-22 16:27 [PATCH] [v2] audit: avoid -Wempty-body warning Arnd Bergmann
2021-03-22 18:00 ` Richard Guy Briggs
2021-03-24 16:14 ` Paul Moore [this message]
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='CAHC9VhQEyA6iy84j=Bryvxwp7EYVN2JibTqMmWHk_hTs6Kkadg@mail.gmail.com' \
--to=paul@paul-moore.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jbi.octave@gmail.com \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rgb@redhat.com \
/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).