diff --git a/CMakeLists.txt b/CMakeLists.txt index 88e65c59..b42b4b1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,6 +18,8 @@ project(${LIBJWT_PROJECT} HOMEPAGE_URL ${LIBJWT_HOMEPAGE_URL} LANGUAGES C) +add_compile_options(-Wall -Werror -Wextra -Wunused) + # Must be set after the above include(GNUInstallDirs) @@ -167,8 +169,7 @@ set_target_properties(jwt PROPERTIES SOVERSION ${LIBJWT_COMPATVERSION} ) -add_definitions(-D_GNU_SOURCE -O3 -Wall -Werror -Wextra) -add_definitions(-DKEYDIR=\"${CMAKE_SOURCE_DIR}/tests/keys\") +add_definitions(-D_GNU_SOURCE -DKEYDIR=\"${CMAKE_SOURCE_DIR}/tests/keys\") # Install header install(FILES include/jwt.h diff --git a/tests/jwt_checker.c b/tests/jwt_checker.c index 2918cae2..5f9dc071 100644 --- a/tests/jwt_checker.c +++ b/tests/jwt_checker.c @@ -383,7 +383,6 @@ START_TEST(claim_str_addgetdel) { const char exp[] = "{\"iss\":\"disk.swissdisk.com\"}"; jwt_checker_auto_t *checker = NULL; - char_auto *out = NULL; jwt_value_t jval; int ret;