2014-11-12 15:55:09

by Brian Haslett

[permalink] [raw]
Subject: PATCH kernel/acct.c to fix compiler warning

This is the warning:
kernel/acct.c: In function 'do_acct_process':
kernel/acct.c:475:24: warning: unused variable 'ns' [-Wunused-variable]
struct pid_namespace *ns = acct->ns;

and this is the patch:

Signed-off-by: Brian P. Haslett <[email protected]>
--- a/kernel/acct.c 2014-11-11 10:25:49.000000000 +0000
+++ b/kernel/acct.c 2014-11-11 10:25:40.000000000 +0000
@@ -472,7 +472,9 @@ static void do_acct_process(struct bsd_a
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;

/*