From: Jiapeng Chong Date: Fri, 25 Jul 2025 09:52:52 +0000 (+0800) Subject: apparmor: Remove the unused variable rules X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8936125e232803e64cb29e107326a942981188d6;p=thirdparty%2Fkernel%2Flinux.git apparmor: Remove the unused variable rules Variable rules is not effectively used, so delete it. security/apparmor/lsm.c:182:23: warning: variable ‘rules’ set but not used. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=22942 Signed-off-by: Jiapeng Chong Signed-off-by: John Johansen --- diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index cecbb985928f8..9a64b2db02672 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -179,10 +179,8 @@ static int apparmor_capget(const struct task_struct *target, kernel_cap_t *effec struct label_it i; label_for_each_confined(i, label, profile) { - struct aa_ruleset *rules; kernel_cap_t allowed; - rules = profile->label.rules[0]; allowed = aa_profile_capget(profile); *effective = cap_intersect(*effective, allowed); *permitted = cap_intersect(*permitted, allowed);