nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] enable -Wall when available by default


From: Mike Frysinger
Subject: Re: [Nano-devel] [PATCH] enable -Wall when available by default
Date: Mon, 24 Mar 2014 15:03:22 -0400
User-agent: KMail/4.12.3 (Linux/3.13.0; KDE/4.12.3; x86_64; ; )

On Mon 24 Mar 2014 10:44:12 Kamil Dudka wrote:
> On Sunday, March 23, 2014 22:47:48 Eitan Adler wrote:
> > On 23 March 2014 13:57, Mike Frysinger wrote:
> > > The current code doesn't build with any warning flags which allows
> > > for issues to silently creep in.
> > > ---
> > > 
> > >  configure.ac                |  3 ++
> > >  m4/ax_check_compile_flag.m4 | 74
> > >  +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77
> > >  insertions(+)
> > >  create mode 100644 m4/ax_check_compile_flag.m4
> > > 
> > > diff --git a/configure.ac b/configure.ac
> > > index 87336f6..5f2c63e 100644
> > > --- a/configure.ac
> > > +++ b/configure.ac
> > > @@ -432,6 +432,9 @@ fi
> > > 
> > >  dnl Checks for typedefs, structures, and compiler characteristics.
> > > 
> > > +dnl Checks for available flags.
> > > +AX_CHECK_COMPILE_FLAG([-Wall], [CFLAGS="$CFLAGS -Wall"], [], [])
> > 
> > Perhaps we want -Wextra as well?
> > Is the code -Wall -Wextra clean? I haven't checked in a bit.  If it
> > is, we probably want -Werror as well.
> 
> I do not think that using -Werror by default is a good idea.  You never know
> in advance which compiler versions are going to be used to build the
> package. Warnings should be treated as warnings by default.

-Werror by default is fine if there's a --disable-werror configure flag.  
otherwise, yes, it's a really bad idea.

i did not add a check for -Wextra because there's a lot of warnings generated 
by that atm (unused func args and mismatch in sign comparisons).  i didn't 
look too hard at those, but they didn't seem generally useful atm.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]