mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
apparmor: use the condition in AA_BUG_FMT even with debug disabled
This follows the established practice and fixes a build failure for me: security/apparmor/file.c: In function ‘__file_sock_perm’: security/apparmor/file.c:544:24: error: unused variable ‘sock’ [-Werror=unused-variable] 544 | struct socket *sock = (struct socket *) file->private_data; | ^~~~ Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
aabbe6f908
commit
67e370aa7f
|
@ -60,7 +60,11 @@ do { \
|
|||
#define AA_BUG_FMT(X, fmt, args...) \
|
||||
WARN((X), "AppArmor WARN %s: (" #X "): " fmt, __func__, ##args)
|
||||
#else
|
||||
#define AA_BUG_FMT(X, fmt, args...) no_printk(fmt, ##args)
|
||||
#define AA_BUG_FMT(X, fmt, args...) \
|
||||
do { \
|
||||
BUILD_BUG_ON_INVALID(X); \
|
||||
no_printk(fmt, ##args); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
int aa_parse_debug_params(const char *str);
|
||||
|
|
Loading…
Reference in New Issue
Block a user