Re: How to fix warning 'control reaches end of non-void function'

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

 




Hugo Vasconcelos Saldanha wrote:
> On Tue, Jul 29, 2008 at 8:27 PM, Alexander Beregalov
> <a.beregalov@xxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux