lkml.org 
[lkml]   [2014]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] 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]

Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
kernel/acct.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/kernel/acct.c b/kernel/acct.c
index b4c667d22e79..5f277f5c5e29 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -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;

/*
--
2.1.0

\
 
 \ /
  Last update: 2014-10-02 01:41    [W:0.044 / U:0.856 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site