Merge branch 'eive/shadow-local-warning' into eive/develop

This commit is contained in:
Robin Müller 2021-01-19 16:31:04 +01:00
commit 55263fe4d8
3 changed files with 18 additions and 10 deletions

View File

@ -1,5 +1,10 @@
cmake_minimum_required(VERSION 3.13) cmake_minimum_required(VERSION 3.13)
option(FSFW_WARNING_SHADOW_LOCAL_GCC "Enable -Wshadow=local warning in GCC" ON)
# Options to exclude parts of the FSFW from compilation.
option(FSFW_USE_RMAP "Compile with RMAP" ON)
option(FSFW_USE_DATALINKLAYER "Compile with Data Link Layer" ON)
set(LIB_FSFW_NAME fsfw) set(LIB_FSFW_NAME fsfw)
add_library(${LIB_FSFW_NAME}) add_library(${LIB_FSFW_NAME})
@ -40,9 +45,7 @@ endif()
message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.") message(STATUS "Compiling FSFW for the ${OS_FSFW_NAME} operating system.")
# Options to exclude parts of the FSFW from compilation.
option(FSFW_USE_RMAP "Compile with RMAP" ON)
option(FSFW_USE_DATALINKLAYER "Compile with Data Link Layer" ON)
add_subdirectory(action) add_subdirectory(action)
add_subdirectory(container) add_subdirectory(container)
@ -117,11 +120,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-Wno-psabi -Wno-psabi
) )
if(NOT DEFINED WARNING_SHADOW_LOCAL) if(FSFW_WARNING_SHADOW_LOCAL_GCC)
option(WARNING_SHADOW_LOCAL "Show shadows declarations warning." ON)
endif()
if(WARNING_SHADOW_LOCAL)
list(APPEND WARNING_FLAGS "-Wshadow=local") list(APPEND WARNING_FLAGS "-Wshadow=local")
endif() endif()

View File

@ -1,4 +1,6 @@
#include "ActionMessage.h" #include "ActionMessage.h"
#include "HasActionsIF.h"
#include "../objectmanager/ObjectManagerIF.h" #include "../objectmanager/ObjectManagerIF.h"
#include "../storagemanager/StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"
@ -53,7 +55,7 @@ void ActionMessage::setDataReply(CommandMessage* message, ActionId_t actionId,
void ActionMessage::setCompletionReply(CommandMessage* message, void ActionMessage::setCompletionReply(CommandMessage* message,
ActionId_t fid, ReturnValue_t result) { ActionId_t fid, ReturnValue_t result) {
if (result == HasReturnvaluesIF::RETURN_OK) { if (result == HasReturnvaluesIF::RETURN_OK or result == HasActionsIF::EXECUTION_FINISHED) {
message->setCommand(COMPLETION_SUCCESS); message->setCommand(COMPLETION_SUCCESS);
} else { } else {
message->setCommand(COMPLETION_FAILED); message->setCommand(COMPLETION_FAILED);

View File

@ -4,8 +4,15 @@
#include "../ipc/CommandMessage.h" #include "../ipc/CommandMessage.h"
#include "../objectmanager/ObjectManagerIF.h" #include "../objectmanager/ObjectManagerIF.h"
#include "../storagemanager/StorageManagerIF.h" #include "../storagemanager/StorageManagerIF.h"
typedef uint32_t ActionId_t;
using ActionId_t = uint32_t;
/**
* @brief These messages are part of the action module of the FSFW.
* @details
* These messages are sent amongst objects implementing the HasActionsIF. Classes like the
* ActionHelper are able to process these messages.
*/
class ActionMessage { class ActionMessage {
private: private:
ActionMessage(); ActionMessage();