diff options
author | Dimitri Staessens <[email protected]> | 2018-05-28 11:51:35 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2018-05-28 12:53:36 +0200 |
commit | 1bee8b3d288bc2c26432b8e675b18e482a98255e (patch) | |
tree | 0535f99d4b4cc640b1945f779cf50acc8e90a400 /CMakeLists.txt | |
parent | d537083d00facc5f0b53b5a7ffaa417786bdfc1f (diff) | |
download | ouroboros-1bee8b3d288bc2c26432b8e675b18e482a98255e.tar.gz ouroboros-1bee8b3d288bc2c26432b8e675b18e482a98255e.zip |
build: Check for variable length arrays
The clang and gcc compilers don't complain about variable length
arrays using the -c89 flag unless the flag -Wvla or -Wpedantic is
set. This also fixes a memleak and two false positive uninitialized
variable warnings reported by the clang static analyzer in graph.c.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d6d59229..535eef6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,6 +79,7 @@ test_and_set_c_compiler_flag_global(-Werror) test_and_set_c_compiler_flag_global(-Wundef) test_and_set_c_compiler_flag_global(-Wpointer-arith) test_and_set_c_compiler_flag_global(-Wstrict-prototypes) +test_and_set_c_compiler_flag_global(-Wvla) #Wswitch-default check fails on the swig-generated code #test_and_set_c_compiler_flag_global(-Wswitch-default) test_and_set_c_compiler_flag_global(-Wunreachable-code) |