From: Dave Jones <davej@redhat.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: linux-kernel@vger.kernel.org, Rickard Faith <faith@redhat.com>
Subject: Re: [PATCH] fix warning: no return statement in function returning non-void in kernel/audit.c
Date: Mon, 11 Sep 2006 12:03:28 -0400 [thread overview]
Message-ID: <20060911160328.GJ4743@redhat.com> (raw)
In-Reply-To: <200609111715.17080.jesper.juhl@gmail.com>
On Mon, Sep 11, 2006 at 05:15:16PM +0200, Jesper Juhl wrote:
>
> 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().
Which will never be reached. Does marking the function NORET_TYPE
also silence the warning?
Dave
next prev parent reply other threads:[~2006-09-11 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060911160328.GJ4743@redhat.com \
--to=davej@redhat.com \
--cc=faith@redhat.com \
--cc=jesper.juhl@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox