Warnings compiling modules on test3-pre2

From: Pavel Roskin (proski@gnu.org)
Date: Sun Jul 02 2000 - 19:59:57 EST


Hello!

I'm compiling 2.4.0-test3-pre2 on i586 with gcc-2.95.2 (I hope the the gcc
version is not relevant here).

For some reason -Werror has been added to the top-level Makefile. I
believe this has been a "political" decision, so we should start hunting
warnings from now on.

I believe it's late to make such changes in the Makefile, but anyway.
Some modules produce warnings. In my case, "make modules" ends with:

gcc -D__KERNEL__ -I/usr/local/src/linux/include -Wall -Wstrict-prototypes
-O2 -fomit-frame-pointer -Werror -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include
/usr/local/src/linux/include/linux/modversions.h -c -o 3c59x.o 3c59x.c
cc1: warnings being treated as errors
3c59x.c:2516: warning: `vortex_init' defined but not used
3c59x.c:2563: warning: `vortex_cleanup' defined but not used

Then I added -save-temps and looked at 3c59x.i:

static int vortex_init (void)
{
[skipped]
int init_module(void) __attribute__((alias("vortex_init"))); ;
void cleanup_module(void) __attribute__((alias("vortex_cleanup"))); ;

What's the reason to use "static"? Why do we make gcc think that
vortex_init is only visible in this file? It is not true.

I believe that exporting vortex_init() is not such a big deal to play
dirty games with "pseudo-static" functions and aliases.

Regards,
Pavel Roskin

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:13 EST