UBUNTU: SAUCE: fix compilation warning when CONFIG_SECURITY is not set
authorDaniel Lezcano <daniel.lezcano@free.fr>
Tue, 7 Sep 2010 19:45:11 +0000 (21:45 +0200)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:49:14 +0000 (06:49 -0700)
Function prototype differs when CONFIG_SECURITY is not set leading to
a warning:

include/linux/security.h: In function ‘security_task_free’:
include/linux/security.h:2244: warning: no return statement in function returning non-void

The patch that introduced this warning was Maverick commit:
  commit 2aec770a575b15cb1e43c2e16dff4f00a02a8c9a
  Author: Kees Cook <kees.cook@canonical.com>
  Date:   Mon Jun 28 22:34:04 2010 -0700

    UBUNTU: SAUCE: security: create task_free security callback

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@free.fr>

include/linux/security.h

index 78d64cc..f30ea53 100644 (file)
@@ -2255,7 +2255,7 @@ static inline int security_task_create(unsigned long clone_flags)
        return 0;
 }
 
-static inline int security_task_free(struct task_struct *task)
+static inline void security_task_free(struct task_struct *task)
 { }
 
 static inline int security_cred_alloc_blank(struct cred *cred, gfp_t gfp)