tidy-up: miscellaneous

- badwords: replace stray synonyms with 'null-terminator'.
- tests/FILEFORMAT.md: tidy up feature descriptions.
- printf: replace stray `%i` masks with `%d` for consistency.
- pytest: add comments for empty excepts to try silencing GitHub CodeQL
  warnings.
- tool1394, unit1675: merge nested `if`s.
- dnscache: fix typo in comment.
- fix whitespace, indent and newlines.

Closes #21921
This commit is contained in:
Viktor Szakats 2026-06-05 23:02:11 +02:00
parent 849317ff5c
commit 952b04474c
No known key found for this signature in database
31 changed files with 90 additions and 90 deletions

View file

@ -862,6 +862,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [conditional-uninitialized])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [language-extension-token])
fi
dnl Only clang 3.1 or later
if test "$compiler_num" -ge "301"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-non-iso])
@ -883,6 +884,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
;;
esac
fi
dnl Only clang 3.3 or later
if test "$compiler_num" -ge "303"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-documentation-unknown-command"
@ -914,38 +916,46 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
tmp_CFLAGS="$tmp_CFLAGS -Wno-varargs"
fi
fi
dnl clang 7 or later
if test "$compiler_num" -ge "700"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [assign-enum])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [extra-semi-stmt])
fi
dnl clang 10 or later
if test "$compiler_num" -ge "1000"; then
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 and above only
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [xor-used-as-pow])
fi
dnl clang 13 or later
if test "$compiler_num" -ge "1300"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-function-type])
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [reserved-identifier]) # Keep it before -Wno-reserved-macro-identifier
tmp_CFLAGS="$tmp_CFLAGS -Wno-reserved-macro-identifier" # Sometimes such external macros need to be set
fi
dnl clang 16 or later
if test "$compiler_num" -ge "1600"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-unsafe-buffer-usage"
fi
dnl clang 17 or later
if test "$compiler_num" -ge "1700"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-function-type-strict]) # with Apple clang it requires 16.0 or above
fi
dnl clang 19 or later
if test "$compiler_num" -ge "1901"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-format-signedness"
fi
dnl clang 20 or later
if test "$compiler_num" -ge "2001"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [array-compare])
fi
dnl clang 21 or later
if test "$compiler_num" -ge "2101"; then
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [c++-hidden-decl])