tech-kern archive

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

Re: Some kernel void functions do return a value

David Young <> wrote:
> This isn't just a lint bug?  At least two of these are instances of void
> functions returning the return "value" of a void function, for which
> the compiler need neither throw away a value nor create one from whole
> nothing.  The compiler doesn't complain---should it?  For example:

It has no harm, but C standard does not permit return with an expression
for void functions.  Compiler throws a warning with -std=c99.

> static void
> sipcom_do_detach(...)
> { ... }
> static void
> sipcom_attach(...)
> {
>       return sipcom_do_detach(...);
> }


Home | Main Index | Thread Index | Old Index