mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Muli Ben-Yehuda <mulix@actcom.co.il>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: William Lee Irwin III <wli@holomorphy.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: PATCH: compile the kernel with -Werror
Date: Sat, 13 Jul 2002 10:26:15 +0300	[thread overview]
Message-ID: <20020713102615.H739@alhambra.actcom.co.il> (raw)

[-- Attachment #1: Type: text/plain, Size: 1512 bytes --]

A full kernel compilation, especially when using the -j switch to
make, can cause warnings to "fly off the screen" without the user
noticing them. For example, wli's patch lazy_buddy.2.5.25-1 of today
had a missing return statement in a function returning non void, which
the compiler probably complained about but the warning got lost in the
noise (a little birdie told me wli used -j64). 

The easiest safeguard agsinst this kind of problems is to compile with
-Werror, so that wherever there's a warning, compilation
stops. Compiling 2.5.25 with -Werror with my .config found only three
warnings (quite impressive, IMHO), and patches for those were sent to
trivial@rusty.

Patch against 2.5.25 to add -Werror attached:

--- linux-2.5.25-vanilla/Makefile	Sat Jul  6 02:42:04 2002
+++ linux-2.5.25-mx/Makefile	Sat Jul 13 10:01:55 2002
@@ -39,7 +39,7 @@
 FINDHPATH	= $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net
 
 HOSTCC  	= gcc
-HOSTCFLAGS	= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS	= -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer 
 
 CROSS_COMPILE 	=
 
@@ -211,7 +211,7 @@
 
 CPPFLAGS := -D__KERNEL__ -I$(HPATH)
 
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
+CFLAGS := $(CPPFLAGS) -Wall -Werror -Wstrict-prototypes -Wno-trigraphs -O2 \
 	  -fomit-frame-pointer -fno-strict-aliasing -fno-common
 AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)

-- 
http://vipe.technion.ac.il/~mulix/
http://syscalltrack.sf.net/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2002-07-13  7:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-13  7:26 Muli Ben-Yehuda [this message]
2002-07-13  8:02 ` Zwane Mwaikambo
2002-07-13  7:43   ` Muli Ben-Yehuda
2002-07-13 14:49     ` Thunder from the hill
2002-07-13  8:17 ` Mike Galbraith
2002-07-13 13:10 ` Kenneth Johansson
2002-07-13 13:41 ` Roy Sigurd Karlsbakk
2002-07-13 14:59   ` Alan Cox
2002-07-16 20:36   ` James Antill
2002-07-13 14:24 ` Alan Cox
2002-07-13 13:34   ` William Lee Irwin III
2002-07-13 18:46   ` Linus Torvalds
2002-07-13 21:31 Dan Kegel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020713102615.H739@alhambra.actcom.co.il \
    --to=mulix@actcom.co.il \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®