[Ocfs2-tools-devel] Re: [PATCH 1/4] build: Set standard gcc warning
switches in Config.make.in
Joel Becker
Joel.Becker at oracle.com
Thu Feb 21 16:17:32 PST 2008
On Thu, Feb 21, 2008 at 04:08:30PM -0800, Mark Fasheh wrote:
> 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 | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/Config.make.in b/Config.make.in
> index af829c6..97803a9 100644
> --- a/Config.make.in
> +++ b/Config.make.in
> @@ -43,7 +43,10 @@ CPP = @CPP@
> AR = @AR@
> RANLIB = @RANLIB@
>
> -CFLAGS = @CFLAGS@
> +WARNINGS = -Wall -Wstrict-prototypes -Wmissing-prototypes \
> + -Wmissing-declarations
> +
> +CFLAGS = @CFLAGS@ $(WARNINGS)
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)".
Joel
--
"The lawgiver, of all beings, most owes the law allegiance. He of all
men should behave as though the law compelled him. But it is the
universal weakness of mankind that what we are given to administer we
presently imagine we own."
- H.G. Wells
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-tools-devel
mailing list