build: enable warnings "-Wint-conversion" and "-Wold-style-definition"

See https://lwn.net/Articles/913505/ .
This commit is contained in:
Thomas Haller
2022-11-03 10:16:10 +01:00
parent 4d2cb2d32b
commit abbacb1085
2 changed files with 6 additions and 0 deletions

View File

@@ -95,11 +95,14 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wformat-nonliteral \
-Wformat-security \
-Wimplicit-function-declaration \
-Wimplicit-int \
-Winit-self \
-Wint-conversion \
-Wlogical-op \
-Wmissing-declarations \
-Wmissing-include-dirs \
-Wmissing-prototypes \
-Wold-style-definition \
-Wparentheses-equality \
-Wpointer-arith \
-Wshadow \

View File

@@ -179,11 +179,14 @@ common_flags += cc.get_supported_arguments([
'-Wformat-nonliteral',
'-Wformat-security',
'-Wimplicit-function-declaration',
'-Wimplicit-int',
'-Winit-self',
'-Wint-conversion',
'-Wlogical-op',
'-Wmissing-declarations',
'-Wmissing-include-dirs',
'-Wmissing-prototypes',
'-Wold-style-definition',
'-Wparentheses-equality',
'-Wpointer-arith',
'-Wshadow',