[tip:warnings/complex] audit: Restrict definition of a static function in kernel/auditsc.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  20152e8def6c6fc9525f29fd0621fecea521eda6
Gitweb:     http://git.kernel.org/tip/20152e8def6c6fc9525f29fd0621fecea521eda6
Author:     Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxxx>
AuthorDate: Wed, 18 Mar 2009 23:49:27 +0200
Committer:  Ingo Molnar <mingo@xxxxxxx>
CommitDate: Thu, 19 Mar 2009 08:26:56 +0100

audit: Restrict definition of a static function in kernel/auditsc.c

Impact: cleanup

The function 'audit_set_auditable' in kernel/auditsc.c is called
only when the CONFIG_AUDIT_TREE option is set. Therefore, the
following warning may be produced:

kernel/auditsc.c:745: warning: 'audit_set_auditable' defined but not used

This patch fixes the warning by moving the function definition under an
appropriate preprocessor construct.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@xxxxxxxxxx>
Cc: akpm@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>


---
 kernel/auditsc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index 8cbddff..bac40d0 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -741,6 +741,7 @@ void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx)
 	rcu_read_unlock();
 }
 
+#ifdef CONFIG_AUDIT_TREE
 static void audit_set_auditable(struct audit_context *ctx)
 {
 	if (!ctx->prio) {
@@ -748,6 +749,7 @@ static void audit_set_auditable(struct audit_context *ctx)
 		ctx->current_state = AUDIT_RECORD_CONTEXT;
 	}
 }
+#endif
 
 static inline struct audit_context *audit_get_context(struct task_struct *tsk,
 						      int return_valid,
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux