[ale] warnings in kernel compile
Benjamin Scherrey
scherrey at gte.net
Fri Jan 1 16:26:32 EST 1999
This means that a function that was declared (or, if not prototyped defaults
to returning an int) as returning some value doesn't actually generate code
for that return value. This results in a warning message which will have no
effect (although its poor programming practice typically indicating K&R
style C code) on your executable as long as the program isn't dependent on
the return value of that particular function (it rarely is). Newer kernels
have gone through and eliminated most of these messages.
regards,
Ben Scherrey
PS: If it makes you feel better a "return 0;" at the end of that function
will usually eliminate the warning.
Ben Coleman wrote:
> I'm doing a kernel compile on my Slackware 3.5 system, and I'm seeing
> this with every .c file compiled:
>
> /usr/src/linux-2.0.34/include/asm/string.h: In function
> '__constant_memcpy'
> /usr/src/linux-2.0.34/include/asm/string.h:443: warning: control reaches
> end of non-void function
> /usr/src/linux-2.0.34/include/asm/string.h: In function
> '__constant_c_and_count_memset'
> /usr/src/linux-2.0.34/include/asm/string.h:594: warning: control reaches
> end of non-void function
>
> I've seen the same thing with 2.0.35.
>
> The resulting kernel appears to work, but I have to wonder where this is
> coming from. Ideas, anyone?
More information about the Ale
mailing list