public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix warning: no return statement in function returning non-void in kernel/audit.c
@ 2006-09-11 15:15 Jesper Juhl
  2006-09-11 16:03 ` Dave Jones
  2006-09-11 22:56 ` Horst H. von Brand
  0 siblings, 2 replies; 6+ messages in thread
From: Jesper Juhl @ 2006-09-11 15:15 UTC (permalink / raw)
  To: linux-kernel; +Cc: jesper.juhl, Rickard Faith


kauditd_thread() is being used in a call to kthread_run(). kthread_run() expects
a function returning 'int' which is also how kauditd_thread() is declared. Unfortunately
kauditd_thread() neglects to return a value which results in this complaint from gcc :

  kernel/audit.c:372: warning: no return statement in function returning non-void

Easily fixed by just adding a 'return 0;' to kauditd_thread().


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 kernel/audit.c |    1 +
 1 file changed, 1 insertion(+)

--- linux-2.6.18-rc6-git3-orig/kernel/audit.c	2006-09-11 10:46:11.092786000 +0200
+++ linux-2.6.18-rc6-git3/kernel/audit.c	2006-09-11 17:08:00.888216381 +0200
@@ -369,6 +369,7 @@ static int kauditd_thread(void *dummy)
 			remove_wait_queue(&kauditd_wait, &wait);
 		}
 	}
+	return 0;
 }
 
 int audit_send_list(void *_dest)




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-09-12  8:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-11 15:15 [PATCH] fix warning: no return statement in function returning non-void in kernel/audit.c Jesper Juhl
2006-09-11 16:03 ` Dave Jones
2006-09-11 19:22   ` Jesper Juhl
2006-09-11 20:23     ` Dave Jones
2006-09-11 22:56 ` Horst H. von Brand
2006-09-12  8:59   ` Jesper Juhl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox