Messages in this thread Patch in this message | | | Date | Wed, 05 Jul 2000 23:36:47 -0400 | From | Jeffrey Fielding <> | Subject | Werror compiler option problems with modules and devfs |
| |
I've noticed that in the last few patches to 2.4.0-test3 (pre3 and pre4), Werror is included in the CFLAGS. Unfortunately, this seems to cause a problem when compiling modules as some of the functions are never used, generating a warning which is considered an error. Also, it complains that fs/devfs/base.c at line 2363 there is an "initialization from incompatible pointer type". This would normally be a warning, but it is treated as an error. It's rather easy to remove Werror from CFLAGS in the Makefile, but I've included a patch below anyway.
I understand that using Werror probably helps enforce cleaner code, but it definately does not work with modules. Also, I tried to figure out how to fix the warning with devfs, but I was unable to. Other than that, the kernel compiled without any warnings.
Jeff Fielding JJProg@cyberbury.net
--- linux.orig/Makefile Wed Jul 5 22:25:32 2000 +++ linux/Makefile Wed Jul 5 22:39:46 2000 @@ -82,7 +82,7 @@
CPPFLAGS := -D__KERNEL__ -I$(HPATH)
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Werror +CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS) # use '-fno-strict-aliasing', but only if the compiler can take it
- 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/
| |