diff options
author | Arnd Bergmann <arnd@arndb.de> | 2021-03-22 12:00:08 +0100 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2021-11-03 08:46:12 +0100 |
commit | c75ea024094e7307219a4f9c706dad5ea461509a (patch) | |
tree | 01aa0a6ed990216125895afcfbaddb449a5fe038 /security/apparmor | |
parent | apparmor: Fix internal policy capable check for policy management (diff) | |
download | linux-c75ea024094e7307219a4f9c706dad5ea461509a.tar.xz linux-c75ea024094e7307219a4f9c706dad5ea461509a.zip |
apparmor: avoid -Wempty-body warning
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 definition to use no_printk(), which improves
format string checking and avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor')
-rw-r--r-- | security/apparmor/include/lib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/include/lib.h b/security/apparmor/include/lib.h index 7d27db740bc2..67fbb81a11f3 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(fmt, ##args) #endif #define AA_ERROR(fmt, args...) \ |