rra / rra-c-util Goto Github PK
View Code? Open in Web Editor NEWRuss Allbery's utility libraries for C
Home Page: https://www.eyrie.org/~eagle/software/rra-c-util/
License: Other
Russ Allbery's utility libraries for C
Home Page: https://www.eyrie.org/~eagle/software/rra-c-util/
License: Other
rra-c-util/tests/data/perlcriticrc
Lines 92 to 94 in 88eed5b
The issue was fixed upstream, so it may be enabled now.
m4/cc-flags.m4 checks for supported warning flags but it seems that Clang always reports them as available because unknown options are not an error by default, but only a warning.
It defeats the purpose of m4/cc-flags.m4...
configure:31771: checking if clang supports -Wformat-overflow=2
configure:31796: clang -c -g -O2 -Wformat-overflow=2 conftest.c >&5
warning: unknown warning option '-Wformat-overflow=2'; did you mean '-Wshift-overflow'? [-Wunknown-warning-option]
1 warning generated.
configure:31796: $? = 0
configure:31805: result: yes
Besides, even for real Clang flags, the check should only report them as available when using a release supporting it (some warning options are not present in all versions).
I don't know whether you wish to do something in rra-c-util about that. You could for instance check for $CLANG
in RRA_PROG_CC_FLAG
and then add -Werror=unknown-warning-option
for the check, or add a new parameter to RRA_PROG_CC_FLAG
for additional flags to use during the probe.
For INN, I've added that quick work-around (which works).
If the compiler recognizes -Werror=unknown-warning-option
, add it to $CFLAGS
:
RRA_PROG_CC_FLAG([-Werror=unknown-warning-option],
[CFLAGS="$CFLAGS -Werror=unknown-warning-option"], [])
Then run all the RRA_PROG_CC_FLAG
probes for compiler warnings, hardening flags etc.
And afterwards, remove that flag from $CFLAGS
:
CFLAGS=`AS_ECHO(["${CFLAGS}"]) | sed 's/ -Werror=unknown-warning-option//'`
The comment is not right in three m4 macros (bdb.m4, sasl.m4, zlib.m4). For instance:
dnl Provides the RRA_LIB_BDB_OPTIONAL macro, which should be used if Berkeley
dnl DB support is optional. This macro will still always set the substitution
dnl variables, but they'll be empty unless --with-bdb is given.
It should rather be they'll be empty unless Berkeley DB libraries are found and --without-bdb is not given
.
The comment in libevent.m4, openssl.m4, pcre.m4, remctl.m4 and sqlite3.m4
could be homogenized in a similar way. It currently merely says If it isn't found, the substitution variables will be empty
or a variation with unless the library is found
without mentioning the --without-xxx
flag.
Also, there's a typo in "ecurrent" in kadm5clnt.m4.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.