James wrote:
> i've just received the GPL Version of Slackware Linux 3.5 and installed it
> on my P200MMX. The first thing i tried doing was compiling a new kernel,
> however i always get this error message:
>
> make[2]: Entering directory `/usr/src/linux/kernel'
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
>-fomit-frame-pointer -fno-strength-reduce -pipe -m486 -malign-loops=2 -malign-jumps=2
>-malign-functions=2 -DCPU=586 -c -o signal.o signal.c
> /usr/src/linux/include/asm/string.h: In function `__constant_memcpy':
> In file included from /usr/src/linux/include/linux/string.h:39,
> from /usr/src/linux/include/asm/termios.h:58,
> from /usr/src/linux/include/linux/termios.h:5,
> from /usr/src/linux/include/linux/tty.h:20,
> from /usr/src/linux/include/linux/sched.h:26,
> from signal.c:7:
> /usr/src/linux/include/asm/string.h:443: warning: control reaches end of non-void
>function
> /usr/src/linux/include/asm/string.h: In function `__constant_c_and_count_memset':
> /usr/src/linux/include/asm/string.h:594: warning: control reaches end of non-void
>function
This isn't an error message, it's a warning.
> it happens for _every_ file that gets compiled. At first i thought it was
> because i'd messed up the source so i rm'd the /usr/src/linux tree and untarred
> it again and followed the info in the README about setting the symlinks but that
> made no difference. I've also tried re-installing everything and that didn't
> help.
>
> why does this happen and how can i fix it?
It happens because gcc hasn't realised that one of the cases in the
switch will always be executed, so it's complaining that the function
might return a nonsense value (although it won't).
It shouldn't prevent the kernel from being compiled.
You should be able to suppress the warnings by adding
return (void *) O;
to the end of the functions in question.
However, an increase in warnings is symptomatic of gcc-2.8.
Apparently, the kernel doesn't compile correctly with gcc-2.8, so you
may need to use an older version of gcc to compile the kernel.
--
Glynn Clements <[EMAIL PROTECTED]>