[Ocfs2-tools-devel] Re: [PATCH 1/4] build: Set standard gcc warning switches in Config.make.in

Mark Fasheh mark.fasheh at oracle.com
Thu Feb 21 16:26:50 PST 2008


On Thu, Feb 21, 2008 at 04:17:32PM -0800, Joel Becker wrote:
> Can we change this to:
> 
> CFLAGS = @CFLAGS@
> CFLAGS += $(WARNINGS)
> 
> The current way, if I do "make CFLAGS='-O2'", I squash the warnings.
> This way, I get "-O2 $(WARNINGS)".

Good idea - updated patch below.
	--Mark

--
Mark Fasheh
Principal Software Developer, Oracle
mark.fasheh at oracle.com


build: Set standard gcc warning switches in Config.make.in

The vast majority of warnings set by individual Makefiles in ocfs2-tools are
redundant. We can just pick a default set of warnings which all programs are
safe to inherit. The change to actually use the CFLAGS from Config.make.in
will come in a later patch.

Signed-off-by: Mark Fasheh <mark.fasheh at oracle.com>
---
 Config.make.in |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/Config.make.in b/Config.make.in
index af829c6..6d79148 100644
--- a/Config.make.in
+++ b/Config.make.in
@@ -43,7 +43,11 @@ CPP = @CPP@
 AR = @AR@
 RANLIB = @RANLIB@
 
+WARNINGS = -Wall -Wstrict-prototypes -Wmissing-prototypes \
+	   -Wmissing-declarations
+
 CFLAGS = @CFLAGS@
+CFLAGS += $(WARNINGS)
 CPPFLAGS = @CPPFLAGS@
 LDFLAGS = @LDFLAGS@ 
 
-- 
1.5.3.6




More information about the Ocfs2-tools-devel mailing list