Re: [hackers] [st][PATCH 14/24] now st can build without errors/warnings with -Wall -Wextra -Wpedantic enabled, enable them by default

From: Quentin Rameau <quinq_AT_fifth.space>
Date: Tue, 22 Jan 2019 10:54:31 +0100

Hello again,

> +WARN = -Wall -Wextra -Wpedantic
> CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
> -STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS)
> -STLDFLAGS = $(LIBS) $(LDFLAGS)
> +STCFLAGS = $(INCS) $(CPPFLAGS) $(CFLAGS) $(WARN)
> +STLDFLAGS = $(LIBS) $(LDFLAGS) $(WARN)

I think this is exactly what's wrong here.

Those warning of for development purposes, not software publication.

That's ok, when you're writing code, to possibly turn those on, read
what they say, and then decide if they're correct or not (everybody can
make a mistake).

Those warnings are not a golf game, where you'd have to modify code
until they don't show up anymore.

Again, they're just here to show something suspect in the (blind) eye
of the compiler, but ultimately you're the one in control there and
(should) know what you're doing.
When in doubt, re-open the standard(s) for answers.
When you didn't write the original code, you have to understand what
the original author wanted to do, that's easier when he wrote it in a
sane way.

The only acceptable GNU warning flag here maybe be -w.
Received on Tue Jan 22 2019 - 10:54:31 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 22 2019 - 11:00:21 CET