From 0cd457725e8edae8b3c8bc580262f77fd09ab82d Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Jan 2021 21:35:17 +0100 Subject: [PATCH] trying to suppress certain warnings --- CMakeLists.txt | 21 +++++++++++---------- datapool/PoolDataSetBase.h | 17 ++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 587e6701..76542842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -107,14 +107,16 @@ else() endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set(WARNING_FLAGS - -Wall - -Wextra - -Wshadow=local - -Wimplicit-fallthrough=1 - -Wno-unused-parameter - -Wno-psabi - ) + if(NOT DEFINED FSFW_WARNING_FLAGS) + set(FSFW_WARNING_FLAGS + -Wall + -Wextra + -Wshadow=local + -Wimplicit-fallthrough=1 + -Wno-unused-parameter + -Wno-psabi + ) + endif() endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") @@ -135,8 +137,7 @@ target_include_directories(${LIB_FSFW_NAME} PRIVATE ${FSFW_CONFIG_PATH_ABSOLUTE} ) -# Machine specific options can be set with the ABI_FLAGS variable. target_compile_options(${LIB_FSFW_NAME} PRIVATE - ${WARNING_FLAGS} + ${FSFW_WARNING_FLAGS} ${COMPILER_FLAGS} ) diff --git a/datapool/PoolDataSetBase.h b/datapool/PoolDataSetBase.h index d741dabc..65a6651e 100644 --- a/datapool/PoolDataSetBase.h +++ b/datapool/PoolDataSetBase.h @@ -120,17 +120,16 @@ public: virtual ReturnValue_t deSerialize(const uint8_t** buffer, size_t* size, SerializeIF::Endianness streamEndianness) override; + /** + * Can be used to individually protect every read and commit call. + * @param protectEveryReadCommit + * @param mutexTimeout + */ + void setReadCommitProtectionBehaviour(bool protectEveryReadCommit, + MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING, + uint32_t mutexTimeout = 20); protected: - /** - * Can be used to individually protect every read and commit call. - * @param protectEveryReadCommit - * @param mutexTimeout - */ - void setReadCommitProtectionBehaviour(bool protectEveryReadCommit, - MutexIF::TimeoutType timeoutType = MutexIF::TimeoutType::WAITING, - uint32_t mutexTimeout = 20); - /** * @brief The fill_count attribute ensures that the variables * register in the correct array position and that the maximum