Age | Commit message (Collapse) | Author | Files | Lines |
|
aclocal uses this to determine whether it needs to update m4 files in
local trees.
|
|
The problem with assert() is that it does not print the contents of
the variables. It also can be disabled on NDEBUG. But we always want
these consistency checks no matter what, and they are not performance
sensitive anyway.
Enable -Wno-nonnull-compare so that we can keep doing run-time non-NULL
checks in functions, instead of just compile-time checks.
|
|
|
|
Fix a couple of function parameter typos surfaced by the new warning.
Warned-by: clang
|
|
This makes it easier to add new ones without accidentally adding
duplicates.
|
|
This is less error prone, less repetitive and the correct thing to do
ayway. Instead of manually passing the positive form for these flags.
|
|
|
|
At least gcc and clang do not warn on -Wno-* warning flags, only when
something else needs to be reported, which defeats our test. In those
cases pass an additional argument that will be what we will actually
check, but not use afterwards.
|
|
This emits a false positive for the test suite.
Warned-by: clang
|
|
Indent the code in a way that makes it easier to follow. Use AS_IF
instead of shell constructs. Quote all autoconf macro arguments.
Add a new section to coding-style.txt describing M4sh/Autoconf.
|
|
Detect if the flags work at configure time, instead of enabling them
unconditionally. Amend the description so that the above is clear. And
rename the options so that downstreams realize about the change.
|
|
|
|
Warn on features not present in ISO C99 but present in ISO C11,
on sizeof for an array argument, on switch keyword with bool
values, and logical not on the left handside of a comparison.
|
|
This flag does not work anymore in gcc 5 w/o also passing -Wformat.
|
|
Use the opportunity to fix the indentation.
|
|
We enable -Werror when checking the flags so that on compilers like
clang which just emit a warning on unknown warning options, instead
of erroring out, we get proper detection.
We could just use stuff like -Werror=unknown-warning-option and
-Werror=unused-command-line-argument, but then we would need to detect
if those are available as they might make the compiler error out if
they are no supported. So just using the blanket -Werror, although more
broad, makes the code less complicated.
|
|
|
|
|
|
And clarify the comment on the designated initializers.
|
|
It is way more descriptive, and has a better type. Check for C++11
compiler support and fallback nullptr to 0 if unavailable.
|
|
Specify the current compiler being used, and shorten the message
checking for an option to enable C99 support.
|
|
This fixes a build failure with old g++ compilers not accepting
-Wc++11-compat.
|
|
|
|
The ncurses bug (#542031) has long been fixed.
|
|
We use those to create binary output, so we require them to be working.
|
|
|
|
Remove trailing spaces. Remove blank lines not separating different code
blocks. Remove blank lines at the end of the file.
|
|
Global review, which includes the following changes to try to increase
consistency, update and improve the source code comments:
- Spelling fixes.
- Use American English forms.
- Uppercase NULL, NUL and ASCII.
- Use “Note: ” instead of the slightly cryptic “NB: ” form.
- Write comments as proper sentences, including capitalizations and
ending dots.
- Move comments before the code, function or variable they refer to.
- Move general function comments outside the body.
- Convert function and variable description comments to doxygen.
- Use one space before dot, exclamation and question marks.
- Use ‘’ or “” instead of `' style quoting.
- Remove author names from comments, already visible from “git blame”.
- Mark strings for translators with “TRANSLATORS: ”.
- Remove useless or outdated comments.
- Fix comment indentation.
- Standardize comment format:
/* Short text comment. */
/* Long text,
* comment. */
/*
* Section text.
*/
|
|
The current code was executing code in the action arguments, instead
of just setting boolean flags and processing them afterwards. This
poses several problems, it implies jugling code around in case the the
default changes, it might also duplicate code, and it might leave the
ACTION-IF-NOT-GIVEN argument empty which could turn into an empty
“then fi” shell block which is a syntax error on POSIX shell. Leaving
the ACTION-IF-GIVEN argument empty is fine as it's always used by
autoconf to set $enableval to the specific enable variable, and setting
that variable from $enableval is redundant and might be wrong depending
on the order they are set, which could empty it.
Reported-by: Michael Schmidt <michael.schmidt.dangel@gmail.com>
|
|
This was making the regex non-functional, as the square brackets
were being removed when generating the output file, thus making the
--disable-compiler-optimisations and --disable-linker-optimisations
non-functional.
|
|
|
|
The set of default warnings is quite safe, and should point out real
problems or stylistic ones. It's easy to forget, so let's enable them by
default. This will also not interfere with user settings as those will
override the defaults.
|
|
Check for compiler support from preprocessor macros and selectively
enable specific __attribute__ specifications. We avoid exposing the
configure variable HAVE_C_ATTRIBUTE, which was never defined for the
installed headers. Remove the now unused DPKG_C_ATTRIBUTE autoconf
macro.
|
|
|
|
|
|
This avoids possible future collisions and makes it easier to see
what's coming from dpkg and what each file is for.
|