acct: fix build warning when ACCT_VERSION != 3
PATCH 1/1 acct: fix build warning when ACCT_VERSION != 3
struct pid_namespace *ns is used only when ACCT_VERSION is 3.
kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]
--- kernel/acct.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/acct.c +2 -0
@@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)acct_t ac;unsigned long flim;const struct cred *orig_cred; +#if ACCT_VERSION ==3 struct pid_namespace *ns = acct->ns; +#endif struct file *file = acct->file;/*
Signature · 1 line
2.1.0
Quoted 14 lines · On Thu, 2 Oct 2014 00:06:53 +0100 Luis Henriques…
struct
pid_namespace*ns is used only whenACCT_VERSIONis 3.
kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]Signed-off-by Luis Henriques <[email protected]>--- kernel/acct.c | 2 ++ 1 file changed, 2 insertions(+)kernel/acct.c +0
-0
kernel/acct.c static void do_acct_process(struct bsd_acct_struct *acct) · line 480
Quoted 9 lines
kernel/acct.c +2
-0@@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)acct_t ac;unsigned long flim;const struct cred *orig_cred; +#if ACCT_VERSION ==3 struct pid_namespace *ns = acct->ns; +#endif struct file *file = acct->file;/*
It's always a good idea to check linux-next. This has been addressed by
http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning.patch
http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning-fix.patch
Quoted 24 lines · Andrew Morton
Quoted 22 lines · On Thu, 2 Oct 2014 00:06:53 +0100 Luis Henriques…
struct
pid_namespace*ns is used only whenACCT_VERSIONis 3.
kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]Signed-off-by Luis Henriques <[email protected]>--- kernel/acct.c | 2 ++ 1 file changed, 2 insertions(+)kernel/acct.c +2
-0@@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_acct_struct *acct)acct_t ac;unsigned long flim;const struct cred *orig_cred; +#if ACCT_VERSION ==3 struct pid_namespace *ns = acct->ns; +#endif struct file *file = acct->file;
Quoted 7 lines
kernel/acct.c static void do_acct_process(struct bsd_acct_struct *acct) · line 480
Quoted 1 line
kernel/acct.c +0
-0/* It's always a good idea to check linux-next. This has been addressed by
http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning.patch
http://ozlabs.org/~akpm/mmots/broken-out/acct-eliminate-compile-warning-fix.patch
Ah, awesome! I missed these patches. Thanks Andrew.
Cheers,
--
Luís