[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] [PATCH] enable -Wall when available by default
From: |
Kamil Dudka |
Subject: |
Re: [Nano-devel] [PATCH] enable -Wall when available by default |
Date: |
Mon, 24 Mar 2014 10:44:12 +0100 |
User-agent: |
KMail/4.11.5 (Linux/3.12.13-gentoo; KDE/4.11.5; x86_64; ; ) |
On Sunday, March 23, 2014 22:47:48 Eitan Adler wrote:
> On 23 March 2014 13:57, Mike Frysinger <address@hidden> 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.
Kamil