lkml.org 
[lkml]   [2000]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectWerror 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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.115 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site