All of lore.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: How to fix warning 'control reaches end of non-void function'
Date: Wed, 30 Jul 2008 15:57:01 +0000	[thread overview]
Message-ID: <48908F4D.2050805@bfs.de> (raw)
In-Reply-To: <20080729191738.GA32506@orion>



Hugo Vasconcelos Saldanha wrote:
> On Tue, Jul 29, 2008 at 8:27 PM, Alexander Beregalov
> <a.beregalov@gmail.com> wrote:
>> Looks good, but how can I know which value should it return in that case?
>>
> 
> I think you should specify an error code to return, letting the caller
> decide what to do with it.
> 

You need to know
* can it be fixed ? the kernel/cpuset.c clearly shows NO
i have an (wrong?) argument that can not be fixed.

* is it save to leave untouched ?
(no idea in that case).
if yes document there is a unknown argument syslog()
or panic()

in some cases it may even be useful to make a function void().

re,
 wh


      parent reply	other threads:[~2008-07-30 15:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-29 19:17 How to fix warning 'control reaches end of non-void function' Alexander Beregalov
2008-07-29 20:48 ` Daniel Baluta
2008-07-29 20:51 ` Johannes Weiner
2008-07-29 21:02 ` Marcin Slusarz
2008-07-29 21:20 ` Johannes Weiner
2008-07-29 22:38 ` Rene Herman
2008-07-29 23:15 ` Jacob
2008-07-29 23:27 ` Alexander Beregalov
2008-07-30  8:34 ` Sandeep K Sinha
2008-07-30 12:40 ` Hugo Vasconcelos Saldanha
2008-07-30 15:57 ` walter harms [this message]

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=48908F4D.2050805@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.