Merge pull request 'Warning on local shadowing can be disabled optionally for GCC' (#357) from eive/fsfw:eive/shadow-local-warning into development

Reviewed-on: fsfw/fsfw#357
This commit is contained in:
Steffen Gaisser 2021-01-19 16:28:56 +01:00
commit 2f64c16a8a
2 changed files with 12 additions and 4 deletions

View File

@ -116,7 +116,15 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-Wno-unused-parameter
-Wno-psabi
)
if(NOT DEFINED WARNING_SHADOW_LOCAL)
option(WARNING_SHADOW_LOCAL "Show shadows declarations warning." ON)
endif()
if(WARNING_SHADOW_LOCAL)
list(APPEND WARNING_FLAGS "-Wshadow=local")
endif()
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")

View File

@ -1,7 +1,7 @@
#ifndef FSFW_DATAPOOLLOCAL_POOLREADHELPER_H_
#define FSFW_DATAPOOLLOCAL_POOLREADHELPER_H_
#ifndef FSFW_DATAPOOL_POOLREADHELPER_H_
#define FSFW_DATAPOOL_POOLREADHELPER_H_
#include "LocalPoolDataSetBase.h"
#include "ReadCommitIF.h"
#include "../serviceinterface/ServiceInterface.h"
#include <FSFWConfig.h>
@ -48,4 +48,4 @@ private:
#endif /* FSFW_DATAPOOLLOCAL_POOLREADHELPER_H_ */
#endif /* FSFW_DATAPOOL_POOLREADHELPER_H_ */