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:
parent
298415fff3
commit
c8f2a813e3
|
@ -3,7 +3,8 @@ target_compile_options(zm-warning-interface
|
||||||
-Wall
|
-Wall
|
||||||
-Wextra
|
-Wextra
|
||||||
-Wimplicit-fallthrough
|
-Wimplicit-fallthrough
|
||||||
-Wno-unused-parameter)
|
-Wno-unused-parameter
|
||||||
|
-Wvla)
|
||||||
|
|
||||||
if(ENABLE_WERROR)
|
if(ENABLE_WERROR)
|
||||||
target_compile_options(zm-warning-interface
|
target_compile_options(zm-warning-interface
|
||||||
|
|
|
@ -7,7 +7,8 @@ target_compile_options(zm-warning-interface
|
||||||
-Wno-cast-function-type
|
-Wno-cast-function-type
|
||||||
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11>:-Wno-clobbered>
|
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11>:-Wno-clobbered>
|
||||||
-Wno-unused-parameter
|
-Wno-unused-parameter
|
||||||
-Woverloaded-virtual)
|
-Woverloaded-virtual
|
||||||
|
-Wvla)
|
||||||
|
|
||||||
if(ENABLE_WERROR)
|
if(ENABLE_WERROR)
|
||||||
target_compile_options(zm-warning-interface
|
target_compile_options(zm-warning-interface
|
||||||
|
|
Loading…
Reference in New Issue