On Tue, Dec 17, 2019 at 07:04:48PM +0100, Tomas Mraz wrote:
On Tue, 2019-12-17 at 12:35 +0300, Dmitry V. Levin wrote:
> On Tue, Dec 17, 2019 at 09:23:00AM +0100, Tomas Mraz wrote:
> > On Tue, 2019-12-17 at 01:28 +0300, Dmitry V. Levin wrote:
> > > On Mon, Dec 16, 2019 at 10:51:27AM +0100, Tomas Mraz wrote:
> > > > On Sat, 2019-12-14 at 12:04 +0300, Dmitry V. Levin wrote:
> > > [...]
> > > > > The rest of the change looks OK, although I haven't checked
> > > > > whether
> > > > > it suppresses *all* warnings.
> > > >
> > > > It does for me for -Wall -Wextra with gcc-9.2.1. However I did
> > > > not
> > > > try
> > > > to disable features that are disablable via configure and
> > > > compile
> > > > without them.
> > >
> > > Since we have travis enabled, I've looked into the logs.
> > > There are still quite a few warnings reported by gcc-9.2.1:
> >
> > That's strange. Why I do not see them when building the code with
> > the
> > same compiler locally.
>
> I don't know. These warnings come from "make distcheck".
> Could you by any chance shadowed some of the -W* options added by
> configure?
>
> > Could it be something different in glibc headers?
> >
> > > ../../../libpam/pam_modutil_searchkey.c:116:7: warning:
> > > assignment
> > > discards ‘const’ qualifier from pointer target type [-Wdiscarded-
> > > qualifiers]
>
> I've just looked at the first warning - it's definitely a valid one.
>
> I had an idea to enable -Werror in travis builds, but looks like we
> have
> to fix these warnings first.
The attached patch does not fix the warnings but makes the various
warning flags set by configure to be not overriden by commandline
make CFLAGS='.....' setting.
Is it OK to commit?
If this is accepted I am going to go through the remaining warnings and
fix them.
--
Tomáš Mráz
No matter how far down the wrong road you've gone, turn back.
Turkish proverb
[You'll know whether the road is wrong if you carefully listen to your
conscience.]
diff --git a/conf/pam_conv1/Makefile.am b/conf/pam_conv1/Makefile.am
index 2e64330..6a91b04 100644
--- a/conf/pam_conv1/Makefile.am
+++ b/conf/pam_conv1/Makefile.am
@@ -8,7 +8,9 @@ EXTRA_DIST = README
AM_YFLAGS = -d
-pam_conv1_CFLAGS = -Wno-unused-function -Wno-sign-compare
+AM_CFLAGS = $(WARNINGCFLAGS)
+
+pam_conv1_CFLAGS = $(AM_CFLAGS) -Wno-unused-function -Wno-sign-compare
Let's rename WARNINGCFLAGS to WARN_CFLAGS - the latter is the name
used in other projects I'm familiar with (e.g. strace and gnulib),
it's also the default name used by gl_WARN_ADD macro documented in
https://www.gnu.org/software/gnulib/manual/html_node/warnings.html
The change itself looks fine. According to travis build logs,
there are no compiler invocations without warning flags after this change.
--
ldv