BUILD: Ask modern compilers to help diagnose MSVC 2015's C1004

A few dozens of files had this issue, and it's easier to flag and fix
them if modern (and frequently used) compilers look for it as well
(although C++11 seems not to care for this case?).

Release builds are not affected (it's not critical at all), and you
can already use `--disable-Werror` if you have a reason not to want
any enforced `-Werror=...` flag during local development.
This commit is contained in:
Donovan Watteau
2025-10-05 20:01:50 +02:00
parent 4dea9d9782
commit 39a90b7f27
Vendored
+8
View File
@@ -2698,6 +2698,14 @@ set_flag_if_supported -Wno-pragma-pack
set_flag_if_supported -Wno-address-of-packed-member
# We still have (limited) support for MSVC 2015, but it's easy for it to
# hit fatal C1004 errors, if some files are missing a final newline. Since
# it's quite easy for this to happen, ask more modern compilers to help
# our old friend.
if test "$_release_build" != yes && test "$_werror_build" != no; then
set_flag_if_supported -Werror=newline-eof
fi
if test -n "$STRINGS"; then
_strings=$STRINGS
else