From: John Johansen <john.johansen@canonical.com>
To: Arnd Bergmann <arnd@kernel.org>, James Morris <jmorris@namei.org>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [RESEND] apparmor: avoid -Wempty-body warning
Date: Mon, 27 Sep 2021 12:58:38 -0700 [thread overview]
Message-ID: <9ef5889e-243a-5906-31cd-820a96859034@canonical.com> (raw)
In-Reply-To: <20210927100919.1500526-1-arnd@kernel.org>
On 9/27/21 3:09 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
Arnd, yep my bad for various reasons I haven't done a merge request since then.
I can pickout a set of minor fixes including this and send them up this week.
-
john
> Building with 'make W=1' shows a warning for an empty macro:
>
> security/apparmor/label.c: In function '__label_update':
> security/apparmor/label.c:2096:59: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
> 2096 | AA_BUG(labels_ns(label) != labels_ns(new));
>
> Change the macro defintion to use no_printk(), which improves
> format string checking and avoids the warning.
>
> Acked-by: John Johansen <john.johansen@canonical.com>
> Link: https://lore.kernel.org/all/4e3e409e-c72e-edd5-379a-60883f166405@canonical.com/
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I sentn this back in April, and John replied that it's in the apparmor
> tree, but the fix is still missing as of v5.15-rc2.
>
> Please double-check and re-apply if necessary.
> ---
> security/apparmor/include/lib.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/security/apparmor/include/lib.h b/security/apparmor/include/lib.h
> index 7d27db740bc2..394130a0f3a4 100644
> --- a/security/apparmor/include/lib.h
> +++ b/security/apparmor/include/lib.h
> @@ -36,7 +36,7 @@
> #define AA_BUG_FMT(X, fmt, args...) \
> WARN((X), "AppArmor WARN %s: (" #X "): " fmt, __func__, ##args)
> #else
> -#define AA_BUG_FMT(X, fmt, args...)
> +#define AA_BUG_FMT(X, fmt, args...) no_printk("Apparmor WARN" fmt, ##args)
> #endif
>
> #define AA_ERROR(fmt, args...) \
>
next prev parent reply other threads:[~2021-09-27 19:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-27 10:09 Arnd Bergmann
2021-09-27 19:58 ` John Johansen [this message]
2021-09-27 20:32 ` Arnd Bergmann
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=9ef5889e-243a-5906-31cd-820a96859034@canonical.com \
--to=john.johansen@canonical.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=serge@hallyn.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
all inboxes | Powered by JetHome®