Build: Enable VLA warnings

VLAs (variable-length arrays) are a C99 feature and were never standardised for C++.
There are better alternatives in C++ (mainly std::vector). Enable the warnings
so no new ones can be introduced.
This commit is contained in:
Peter Keresztes Schmidt 2021-04-25 23:52:32 +02:00
parent 298415fff3
commit c8f2a813e3
2 changed files with 4 additions and 2 deletions

View File

@ -3,7 +3,8 @@ target_compile_options(zm-warning-interface
-Wall
-Wextra
-Wimplicit-fallthrough
-Wno-unused-parameter)
-Wno-unused-parameter
-Wvla)
if(ENABLE_WERROR)
target_compile_options(zm-warning-interface

View File

@ -7,7 +7,8 @@ target_compile_options(zm-warning-interface
-Wno-cast-function-type
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11>:-Wno-clobbered>
-Wno-unused-parameter
-Woverloaded-virtual)
-Woverloaded-virtual
-Wvla)
if(ENABLE_WERROR)
target_compile_options(zm-warning-interface