diff options
author | Dimitri Staessens <[email protected]> | 2021-06-21 20:24:03 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-06-23 08:36:48 +0200 |
commit | 8ca960fa0274018cb4f94a1826029d74e6f762e0 (patch) | |
tree | 268ffb6b24027d65c738a8edd196a1ed52134fcc /CMakeLists.txt | |
parent | ac53f8ea09b9a24321bc2c00832ba8a117115134 (diff) | |
download | ouroboros-8ca960fa0274018cb4f94a1826029d74e6f762e0.tar.gz ouroboros-8ca960fa0274018cb4f94a1826029d74e6f762e0.zip |
lib, ipcpd, irmd: Wrap pthread unlocks for cleanup
This add an ouroboros/pthread.h header that wraps the
pthread_..._unlock() functions for cleanup using
pthread_cleanup_push() as this casting is not safe (and there were
definitely bad casts in the code). The close() function is now also
wrapped for cleanup in ouroboros/sockets.h.
This allows enabling more compiler checks.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dd26c828..e0c7bef3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,8 @@ include(CompilerUtils) test_and_set_c_compiler_flag_global(-std=c89) test_and_set_c_compiler_flag_global(-Wall) # -Wextra may fail on clobbered warning due to pthread_cleanup -# test_and_set_c_compiler_flag_global(-Wextra) +test_and_set_c_compiler_flag_global(-Wno-clobbered) +test_and_set_c_compiler_flag_global(-Wextra) # explicitly add other flags in -Wextra test_and_set_c_compiler_flag_global(-Wempty-body) test_and_set_c_compiler_flag_global(-Wignored-qualifiers) @@ -75,14 +76,13 @@ test_and_set_c_compiler_flag_global(-Wuninitialized) test_and_set_c_compiler_flag_global(-Wshift-negative-value) test_and_set_c_compiler_flag_global(-Wunused-parameter) test_and_set_c_compiler_flag_global(-Wunused-but-set-parameter) -# -Wextra parameters 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(-Wswitch-default) +test_and_set_c_compiler_flag_global(-Wreturn-type) test_and_set_c_compiler_flag_global(-Wunreachable-code) test_and_set_c_compiler_flag_global(-Wdeclaration-after-statement) test_and_set_c_compiler_flag_global(-Winfinite-recursion) |