From 6a77b21f9c64e5f13403f792e6b5796a1f5c7010 Mon Sep 17 00:00:00 2001 From: anh Date: Fri, 13 Dec 2019 06:48:04 -0500 Subject: [PATCH 1/8] issue #427, adding travis.yml for cppcheck on flight --- .travis.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..0ba5ca300 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +dist: bionic +sudo: required +language: + - c +compiler: + - gcc +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - cmake + +before_install: + - sudo apt-get install cppcheck + +script: + # Check versions + - cppcheck --version + + #cppcheck flight software cfe/fsw/cfe-core/src + - cppcheck --force --inline-suppr --std=c99 --language=c --error-exitcode=1 --enable=warning,performance,portability,style --suppress=variableScope --inconclusive fsw/cfe-core/src 2>cppcheck_flight_cfe.txt + - | + if [[ -s cppcheck_flight_cfe.txt ]]; then + echo "You must fix cppcheck errors before submitting a pull request" + echo "" + cat cppcheck_flight_cfe.txt + exit -1 + fi + From 0951b6a792124a1a804076839c881fad765d99b8 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Tue, 17 Dec 2019 12:49:35 -0500 Subject: [PATCH 2/8] Fix #435: Update UT entry point Use "UtTest_Setup" instead of "OS_Application_Startup" This needs to be merged in coordination with a related change in OSAL/UT Assert. This also updates the UT application final link to use "ut_assert" rather than "ut_bsp", as the separate bsp for unit test is also getting phased out. --- fsw/cfe-core/unit-test/CMakeLists.txt | 2 +- fsw/cfe-core/unit-test/es_UT.c | 2 +- fsw/cfe-core/unit-test/evs_UT.c | 2 +- fsw/cfe-core/unit-test/fs_UT.c | 2 +- fsw/cfe-core/unit-test/sb_UT.c | 2 +- fsw/cfe-core/unit-test/tbl_UT.c | 2 +- fsw/cfe-core/unit-test/time_UT.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fsw/cfe-core/unit-test/CMakeLists.txt b/fsw/cfe-core/unit-test/CMakeLists.txt index fbab718f2..954a2f178 100644 --- a/fsw/cfe-core/unit-test/CMakeLists.txt +++ b/fsw/cfe-core/unit-test/CMakeLists.txt @@ -56,7 +56,7 @@ foreach(MODULE ${CFE_CORE_MODULES}) ut_${CFE_CORE_TARGET}_stubs ut_psp-${CFE_SYSTEM_PSPNAME}_stubs ut_osapi_stubs - ut_bsp) + ut_assert) add_test(${CFE_CORE_TARGET}_${MODULE}_UT ${CFE_CORE_TARGET}_${MODULE}_UT) install(TARGETS ${CFE_CORE_TARGET}_${MODULE}_UT DESTINATION ${TGTNAME}/${UT_INSTALL_SUBDIR}) endforeach(MODULE ${CFE_CORE_MODULES}) diff --git a/fsw/cfe-core/unit-test/es_UT.c b/fsw/cfe-core/unit-test/es_UT.c index 3bf487098..1987c3d9d 100644 --- a/fsw/cfe-core/unit-test/es_UT.c +++ b/fsw/cfe-core/unit-test/es_UT.c @@ -273,7 +273,7 @@ static int32 ES_UT_SetAppStateHook(void *UserObj, int32 StubRetcode, return StubRetcode; } -void OS_Application_Startup(void) +void UtTest_Setup(void) { UT_Init("es"); UT_Text("cFE ES Unit Test Output File\n\n"); diff --git a/fsw/cfe-core/unit-test/evs_UT.c b/fsw/cfe-core/unit-test/evs_UT.c index fadeb2016..09dc4436c 100644 --- a/fsw/cfe-core/unit-test/evs_UT.c +++ b/fsw/cfe-core/unit-test/evs_UT.c @@ -249,7 +249,7 @@ static void UT_EVS_DoGenericCheckEvents(void (*Func)(void), UT_EVS_EventCapture_ /* ** Functions */ -void OS_Application_Startup(void) +void UtTest_Setup(void) { /* Initialize unit test */ UT_Init("evs"); diff --git a/fsw/cfe-core/unit-test/fs_UT.c b/fsw/cfe-core/unit-test/fs_UT.c index 559ff9f46..5634ee39a 100644 --- a/fsw/cfe-core/unit-test/fs_UT.c +++ b/fsw/cfe-core/unit-test/fs_UT.c @@ -54,7 +54,7 @@ static CFE_FS_Decompress_State_t UT_FS_Decompress_State; /* ** Functions */ -void OS_Application_Startup(void) +void UtTest_Setup(void) { /* Initialize unit test */ UT_Init("fs"); diff --git a/fsw/cfe-core/unit-test/sb_UT.c b/fsw/cfe-core/unit-test/sb_UT.c index 424116338..63785d147 100644 --- a/fsw/cfe-core/unit-test/sb_UT.c +++ b/fsw/cfe-core/unit-test/sb_UT.c @@ -45,7 +45,7 @@ static char cMsg[UT_MAX_MESSAGE_LENGTH]; /* ** Functions */ -void OS_Application_Startup(void) +void UtTest_Setup(void) { UT_Init("sb"); UT_Text("cFE SB Unit Test Output File\n\n"); diff --git a/fsw/cfe-core/unit-test/tbl_UT.c b/fsw/cfe-core/unit-test/tbl_UT.c index 29de484d0..730874932 100644 --- a/fsw/cfe-core/unit-test/tbl_UT.c +++ b/fsw/cfe-core/unit-test/tbl_UT.c @@ -87,7 +87,7 @@ CFE_TBL_RegistryRec_t Original[CFE_PLATFORM_TBL_MAX_NUM_TABLES]; /* ** Functions */ -void OS_Application_Startup(void) +void UtTest_Setup(void) { /* Initialize unit test */ UT_Init("tbl"); diff --git a/fsw/cfe-core/unit-test/time_UT.c b/fsw/cfe-core/unit-test/time_UT.c index 76553aab5..738807f00 100644 --- a/fsw/cfe-core/unit-test/time_UT.c +++ b/fsw/cfe-core/unit-test/time_UT.c @@ -199,7 +199,7 @@ void OS_SelectTone(int16 Signal) } #endif -void OS_Application_Startup(void) +void UtTest_Setup(void) { /* Initialize unit test */ UT_Init("time"); From 4607e4ee852676bb98721ffcbaa26eb91851102c Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 20 Dec 2019 09:26:26 -0500 Subject: [PATCH 3/8] Fix #437: Avoid alignment warnings on some CPUs On CPUs with strict alignment requirements, some CFE code that uses a char-type pointer (e.g. uint8*) to compute memory addresses triggers an alignment warning when it gets cast back to the actual data type. This code should be alignment-safe already, because the address computation already takes CPU alignment requirements into account when calculating the addresses/offsets. However, the compiler still flags the final conversion from a pointer with no special alignment to something with alignment requirements. - For the CFE_SB pool buffers, using the `cpuaddr` type, which is integer in nature, avoids the warning. - For the CFE_TBL internal table pointer, use a `void*` internally to store the buffer pointer, rather than a `uint8_t*`. This changes the casting needs elsewhere. --- fsw/cfe-core/src/sb/cfe_sb_api.c | 7 ++++--- fsw/cfe-core/src/sb/cfe_sb_buf.c | 2 +- fsw/cfe-core/src/tbl/cfe_tbl_internal.c | 6 +++--- fsw/cfe-core/src/tbl/cfe_tbl_task.h | 2 +- fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c | 2 +- fsw/cfe-core/unit-test/tbl_UT.c | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/fsw/cfe-core/src/sb/cfe_sb_api.c b/fsw/cfe-core/src/sb/cfe_sb_api.c index ed03f7e62..fbd70287e 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_api.c +++ b/fsw/cfe-core/src/sb/cfe_sb_api.c @@ -1802,7 +1802,7 @@ CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, { int32 stat1; uint32 AppId = 0xFFFFFFFF; - uint8 *address = NULL; + cpuaddr address = 0; CFE_SB_ZeroCopyD_t *zcd = NULL; CFE_SB_BufferD_t *bd = NULL; @@ -1849,7 +1849,7 @@ CFE_SB_Msg_t *CFE_SB_ZeroCopyGetPtr(uint16 MsgSize, }/* end if */ /* first set ptr to actual msg buffer the same as ptr to descriptor */ - address = (uint8 *)bd; + address = (cpuaddr)bd; /* increment actual msg buffer ptr beyond the descriptor */ address += sizeof(CFE_SB_BufferD_t); @@ -1914,6 +1914,7 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, { int32 Status; int32 Stat2; + cpuaddr Addr = (cpuaddr)Ptr2Release; Status = CFE_SB_ZeroCopyReleaseDesc(Ptr2Release, BufferHandle); @@ -1922,7 +1923,7 @@ int32 CFE_SB_ZeroCopyReleasePtr(CFE_SB_Msg_t *Ptr2Release, if(Status == CFE_SUCCESS){ /* give the buffer back to the buffer pool */ Stat2 = CFE_ES_PutPoolBuf(CFE_SB.Mem.PoolHdl, - (uint32 *) (((uint8 *)Ptr2Release) - sizeof(CFE_SB_BufferD_t))); + (uint32 *) (Addr - sizeof(CFE_SB_BufferD_t))); if(Stat2 > 0){ /* Substract the size of the actual buffer from the Memory in use ctr */ CFE_SB.StatTlmMsg.Payload.MemInUse-=Stat2; diff --git a/fsw/cfe-core/src/sb/cfe_sb_buf.c b/fsw/cfe-core/src/sb/cfe_sb_buf.c index be5cf5b6b..27c561db4 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_buf.c +++ b/fsw/cfe-core/src/sb/cfe_sb_buf.c @@ -116,7 +116,7 @@ CFE_SB_BufferD_t * CFE_SB_GetBufferFromPool(CFE_SB_MsgId_t MsgId, uint16 Size) { CFE_SB_BufferD_t * CFE_SB_GetBufferFromCaller(CFE_SB_MsgId_t MsgId, void *Address) { - CFE_SB_BufferD_t *bd = (CFE_SB_BufferD_t *)(((uint8 *)Address) - sizeof(CFE_SB_BufferD_t)); + CFE_SB_BufferD_t *bd = (CFE_SB_BufferD_t *)((cpuaddr)Address - sizeof(CFE_SB_BufferD_t)); /* Initialize the MsgId in the buffer descriptor (the rest has already been initialized in this case). */ bd->MsgId = MsgId; diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c index f9ede034e..6a18b9667 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c @@ -486,7 +486,7 @@ int32 CFE_TBL_RemoveAccessLink(CFE_TBL_Handle_t TblHandle) if (RegRecPtr->UserDefAddr == false) { /* Free memory allocated to buffers */ - Status = CFE_ES_PutPoolBuf(CFE_TBL_TaskData.Buf.PoolHdl, (uint32 *)RegRecPtr->Buffers[0].BufferPtr); + Status = CFE_ES_PutPoolBuf(CFE_TBL_TaskData.Buf.PoolHdl, RegRecPtr->Buffers[0].BufferPtr); RegRecPtr->Buffers[0].BufferPtr = NULL; if (Status < 0) @@ -498,7 +498,7 @@ int32 CFE_TBL_RemoveAccessLink(CFE_TBL_Handle_t TblHandle) /* If a double buffered table, then free the second buffer as well */ if (RegRecPtr->DoubleBuffered) { - Status = CFE_ES_PutPoolBuf(CFE_TBL_TaskData.Buf.PoolHdl, (uint32 *)RegRecPtr->Buffers[1].BufferPtr); + Status = CFE_ES_PutPoolBuf(CFE_TBL_TaskData.Buf.PoolHdl, RegRecPtr->Buffers[1].BufferPtr); RegRecPtr->Buffers[1].BufferPtr = NULL; if (Status < 0) @@ -986,7 +986,7 @@ int32 CFE_TBL_LoadFromFile(CFE_TBL_LoadBuff_t *WorkingBufferPtr, } NumBytes = OS_read(FileDescriptor, - &WorkingBufferPtr->BufferPtr[TblFileHeader.Offset], + ((uint8*)WorkingBufferPtr->BufferPtr) + TblFileHeader.Offset, TblFileHeader.NumBytes); if (NumBytes != TblFileHeader.NumBytes) diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task.h b/fsw/cfe-core/src/tbl/cfe_tbl_task.h index b60d23b12..37dab99d0 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task.h +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task.h @@ -145,7 +145,7 @@ typedef struct */ typedef struct { - uint8 *BufferPtr; /**< \brief Pointer to Load Buffer */ + void *BufferPtr; /**< \brief Pointer to Load Buffer */ uint32 FileCreateTimeSecs; /**< \brief File creation time from last file loaded into table */ uint32 FileCreateTimeSubSecs; /**< \brief File creation time from last file loaded into table */ uint32 Crc; /**< \brief Last calculated CRC for this buffer's contents */ diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c index d58ebf68e..1db377439 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_task_cmds.c @@ -441,7 +441,7 @@ int32 CFE_TBL_LoadCmd(const CFE_TBL_Load_t *data) { /* Copy data from file into working buffer */ Status = OS_read(FileDescriptor, - &WorkingBufferPtr->BufferPtr[TblFileHeader.Offset], + ((uint8*)WorkingBufferPtr->BufferPtr) + TblFileHeader.Offset, TblFileHeader.NumBytes); /* Make sure the appropriate number of bytes were read */ diff --git a/fsw/cfe-core/unit-test/tbl_UT.c b/fsw/cfe-core/unit-test/tbl_UT.c index 29de484d0..755f13ddc 100644 --- a/fsw/cfe-core/unit-test/tbl_UT.c +++ b/fsw/cfe-core/unit-test/tbl_UT.c @@ -1688,7 +1688,7 @@ void Test_CFE_TBL_HousekeepingCmd(void) CFE_TBL_LoadBuff_t *DumpBuffPtr = &DumpBuff; CFE_TBL_RegistryRec_t RegRecPtr; uint8 Buff; - uint8 *BuffPtr = &Buff; + void *BuffPtr = &Buff; uint32 Secs = 0; uint32 SubSecs = 0; int32 LoadInProg = 0; From a8f9ae8584cfc537c0a74a694c5ea775ca86941a Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Fri, 20 Dec 2019 13:54:57 -0500 Subject: [PATCH 4/8] Fix #438: Set OSAL_SYSTEM_BSPTYPE for native builds This explicitly specifies the BSP to use when using SIMULATION=native flags to the build. All other example toolchain files already included this setting. --- cmake/arch_build.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/arch_build.cmake b/cmake/arch_build.cmake index 9569956bb..8194dc9bb 100644 --- a/cmake/arch_build.cmake +++ b/cmake/arch_build.cmake @@ -280,6 +280,7 @@ function(prepare) "${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN") # Export the variables determined here up to the parent scope SET(CFE_SYSTEM_PSPNAME "pc-linux" PARENT_SCOPE) + SET(OSAL_SYSTEM_BSPTYPE "pc-linux" PARENT_SCOPE) SET(OSAL_SYSTEM_OSTYPE "posix" PARENT_SCOPE) else () # Not cross compiling and host system is not recognized From 9fb47375c6d916e58894992c74c6a9154232193c Mon Sep 17 00:00:00 2001 From: anh Date: Mon, 23 Dec 2019 08:24:24 -0500 Subject: [PATCH 5/8] issue 443, update toolchain-ppc-vxworks6.9 --- cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake b/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake index 70d641c0b..900f0e147 100644 --- a/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake +++ b/cmake/sample_defs/toolchain-ppc-vxworks6.9.cmake @@ -46,6 +46,6 @@ SET(CMAKE_PREFIX_PATH /) # these settings are specific to cFE/OSAL and determines which # abstraction layers are built when using this toolchain SET(CFE_SYSTEM_PSPNAME mcp750-vxworks) -SET(OSAL_SYSTEM_BSPTYPE genppc-vxworks6.4) +SET(OSAL_SYSTEM_BSPTYPE mcp750-vxworks) SET(OSAL_SYSTEM_OSTYPE vxworks) From d85efa5ee36b87ab1ed13ce0a39b931206213c88 Mon Sep 17 00:00:00 2001 From: anh Date: Fri, 27 Dec 2019 09:29:31 -0500 Subject: [PATCH 6/8] Fix #445, create osal api guide with doxygen --- cmake/Makefile.sample | 4 + cmake/mission_build.cmake | 20 ++- cmake/osal-common.doxyfile.in | 248 ++++++++++++++++++++++++++++++++++ cmake/osalguide.doxyfile.in | 22 +++ docs/src/osal_fs.dox | 50 +++++++ docs/src/osal_timer.dox | 7 + docs/src/osalguide.dox | 30 ++++ docs/src/osalmain.dox | 50 +++++++ 8 files changed, 430 insertions(+), 1 deletion(-) create mode 100644 cmake/osal-common.doxyfile.in create mode 100644 cmake/osalguide.doxyfile.in create mode 100644 docs/src/osal_fs.dox create mode 100644 docs/src/osal_timer.dox create mode 100644 docs/src/osalguide.dox create mode 100644 docs/src/osalmain.dox diff --git a/cmake/Makefile.sample b/cmake/Makefile.sample index e3025af0e..9480a4d3f 100644 --- a/cmake/Makefile.sample +++ b/cmake/Makefile.sample @@ -147,6 +147,10 @@ usersguide: $(MAKE) --no-print-directory -C "$(O)" cfe-usersguide @/bin/echo -e "\n\ncFE Users Guide: \nfile://$(CURDIR)/$(O)/doc/users_guide/html/index.html\n" +osalguide: + $(MAKE) --no-print-directory -C "$(O)" osalguide + @/bin/echo -e "\n\nOsal Users Guide: \nfile://$(CURDIR)/$(O)/doc/osal_guide/html/index.html\n" + # Make all the commands that use the build tree depend on a flag file # that is used to indicate the prep step has been done. This way # the prep step does not need to be done explicitly by the user diff --git a/cmake/mission_build.cmake b/cmake/mission_build.cmake index e9e961f84..a362647ab 100644 --- a/cmake/mission_build.cmake +++ b/cmake/mission_build.cmake @@ -213,7 +213,10 @@ function(prepare) configure_file("${CMAKE_SOURCE_DIR}/cmake/cfe-common.doxyfile.in" "${CMAKE_BINARY_DIR}/doc/cfe-common.doxyfile") - + + configure_file("${CMAKE_SOURCE_DIR}/cmake/osal-common.doxyfile.in" + "${CMAKE_BINARY_DIR}/doc/osal-common.doxyfile") + configure_file("${CMAKE_SOURCE_DIR}/cmake/mission-detaildesign.doxyfile.in" "${CMAKE_BINARY_DIR}/doc/mission-detaildesign.doxyfile") @@ -224,6 +227,11 @@ function(prepare) "${MISSION_SOURCE_DIR}/psp/fsw/inc/*.h") string(REPLACE ";" " \\\n" MISSION_USERGUIDE_HEADERFILES "${MISSION_USERGUIDE_HEADERFILES}") + # OSAL API GUIDE include PUBLIC API + file(GLOB MISSION_OSAL_HEADERFILES + "${osal_MISSION_DIR}/src/os/inc/*.h") + string(REPLACE ";" " \\\n" MISSION_OSAL_HEADERFILES "${MISSION_OSAL_HEADERFILES}") + # Addition to usersguide file(GLOB USERGUIDE_MISC_ADDITION "${cfe-core_MISSION_DIR}/src/inc/private/*.h" @@ -235,9 +243,15 @@ function(prepare) # PREDEFINED set(USERGUIDE_PREDEFINED "MESSAGE_FORMAT_IS_CCSDS") + + set(OSALGUIDE_PREDEFINED + "MESSAGE_FORMAT_IS_CCSDS") configure_file("${CMAKE_SOURCE_DIR}/cmake/cfe-usersguide.doxyfile.in" "${CMAKE_BINARY_DIR}/doc/cfe-usersguide.doxyfile") + + configure_file("${CMAKE_SOURCE_DIR}/cmake/osalguide.doxyfile.in" + "${CMAKE_BINARY_DIR}/doc/osalguide.doxyfile") add_custom_target(mission-doc doxygen mission-detaildesign.doxyfile @@ -247,6 +261,10 @@ function(prepare) doxygen cfe-usersguide.doxyfile WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc") + add_custom_target(osalguide + doxygen osalguide.doxyfile + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/doc") + # Certain runtime variables need to be "exported" to the subordinate build, such as # the specific arch settings and the location of all the apps. This is done by creating # a temporary file within the dir and then the subprocess will read that file and re-create diff --git a/cmake/osal-common.doxyfile.in b/cmake/osal-common.doxyfile.in new file mode 100644 index 000000000..6c4c39e62 --- /dev/null +++ b/cmake/osal-common.doxyfile.in @@ -0,0 +1,248 @@ +#--------------------------------------------------------------------------- +# Project related configuration options, shared for all cFE doxygen outputs +#--------------------------------------------------------------------------- +@INCLUDE_PATH = @MISSION_SOURCE_DIR@ +DOXYFILE_ENCODING = UTF-8 +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +OUTPUT_DIRECTORY = . +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = NO +ABBREVIATE_BRIEF = "The $name class " \ + "The $name widget " \ + "The $name file " \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +QT_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +BUILTIN_STL_SUPPORT = NO +CPP_CLI_SUPPORT = NO +SIP_SUPPORT = NO +DISTRIBUTE_GROUP_DOC = NO +SUBGROUPING = YES +TYPEDEF_HIDES_STRUCT = NO +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +EXTRACT_ANON_NSPACES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +HIDE_IN_BODY_DOCS = NO +INTERNAL_DOCS = NO +CASE_SENSE_NAMES = NO +HIDE_SCOPE_NAMES = NO +SHOW_INCLUDE_FILES = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +SORT_BRIEF_DOCS = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = NO +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = YES +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = YES +WARN_FORMAT = "$file:$line: $text " +WARN_LOGFILE = @CMAKE_BINARY_DIR@/doc/warnings.log +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT_ENCODING = UTF-8 +STRIP_FROM_PATH = @MISSION_SOURCE_DIR@ + +# Always include a standard set of CFE documentation in the input set +# This is applicable to both users guide and detail design outputs +#IMAGE_PATH += +INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/osal_fs.dox +INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/osal_timer.dox + +FILE_PATTERNS = *.c *.cpp *.cc *.C *.h *.hh *.hpp *.H *.dox *.md +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXCLUDE_SYMBOLS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = * +EXAMPLE_RECURSIVE = NO +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +REFERENCES_LINK_SOURCE = YES +USE_HTAGS = NO +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +HTML_DYNAMIC_SECTIONS = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = NO +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = YES +PAPER_TYPE = letter +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = YES +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = YES +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = NO +MSCGEN_PATH = +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = YES +CLASS_GRAPH = NO +COLLABORATION_GRAPH = NO +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = NO +CALL_GRAPH = YES +CALLER_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +DOT_GRAPH_MAX_NODES = 50 +MAX_DOT_GRAPH_DEPTH = 1000 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO + +#--------------------------------------------------------------------------- +# OSAL mnemonic mappings +#--------------------------------------------------------------------------- +#@INCLUDE = + diff --git a/cmake/osalguide.doxyfile.in b/cmake/osalguide.doxyfile.in new file mode 100644 index 000000000..c8587a832 --- /dev/null +++ b/cmake/osalguide.doxyfile.in @@ -0,0 +1,22 @@ +#--------------------------------------------------------------------------- +# Doxygen Configuration options to generate the "OSAL API Guide" +#--------------------------------------------------------------------------- + +# Start with the common definitions, some of which are extended or overridden here. + +@INCLUDE = @MISSION_BINARY_DIR@/doc/osal-common.doxyfile +PROJECT_NAME = "Core Flight Executive OSAL API Guide" +OUTPUT_DIRECTORY = osalguide +GENERATE_LATEX = YES + +# Main page for the osal guide +INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/osalmain.dox +INPUT += @MISSION_SOURCE_DIR@/cfe/docs/src/osalguide.dox + +#PREDEFINED +PREDEFINED += @OSALGUIDE_PREDEFINED@ + +# Bring in the cFE header files for the documentation of the various API calls +INPUT += \ +@MISSION_OSAL_HEADERFILES@ \ +@OSAL_MISC_ADDITION@ \ No newline at end of file diff --git a/docs/src/osal_fs.dox b/docs/src/osal_fs.dox new file mode 100644 index 000000000..f99a569e1 --- /dev/null +++ b/docs/src/osal_fs.dox @@ -0,0 +1,50 @@ +/** +\page osalfsovr File System Overview + +The File System API is a thin wrapper around a selection of POSIX file APIs. In addition the File System API presents a common directory structure and volume view regardless of the underlying system type. For example, vxWorks uses MS-DOS style volume names and directories. For example, a vxWorks RAM disk might have the volume “RAM:0”. With this File System API, volumes are represented as Unix-style paths where each volume is mounted on the root file system: + +
    +
  • RAM:0/file1.dat becomes /mnt/ram/file1.dat +
  • FL:0/file2.dat becomes /mnt/fl/file2.dat +
+ +This abstraction allows the applications to use the same paths regardless of the implementation and it also allows file systems to be simulated on a desktop system for testing. On a desktop Linux system, the file system abstraction can be set up to map virtual devices to a regular directory. This is accomplished through the OS_mkfs call, OS_mount call, and a BSP specific volume table that maps the virtual devices to real devices or underlying file systems. + +In order to make this file system volume abstraction work, a “Volume Table” needs to be provided in the Board Support Package of the application. The table has the following fields: + +
    +
  • Device Name: This is the name of the virtual device that the Application uses. Common names are “ramdisk1”, “flash1”, or “volatile1” etc. But the name can be any unique string. + +
  • Physical Device Name: This is an implementation specific field. For vxWorks it is not needed and can be left blank. For a File system based implementation, it is the “mount point” on the root file system where all of the volume will be mounted. A common place for this on Linux could be a user’s home directory, “/tmp”, or even the current working directory “.”. In the example of “/tmp” all of the directories created for the volumes would be under “/tmp” on the Linux file system. For a real disk device in Linux, such as a RAM disk, this field is the device name “/dev/ram0”. + +
  • Volume Type: This field defines the type of volume. The types are: FS_BASED which uses the existing file system, RAM_DISK which uses a RAM_DISK device in vxWorks, RTEMS, or Linux, FLASH_DISK_FORMAT which uses a flash disk that is to be formatted before use, FLASH_DISK_INIT which uses a flash disk with an existing format that is just to be initialized before it’s use, EEPROM which is for an EEPROM or PROM based system. + +
  • Volatile Flag: This flag indicates that the volume or disk is a volatile disk (RAM disk ) or a non-volatile disk, that retains its contents when the system is rebooted. This should be set to TRUE or FALSE. + +
  • Free Flag: This is an internal flag that should be set to FALSE or zero. + +
  • Is Mounted Flag: This is an internal flag that should be set to FALSE or zero. Note that a “pre-mounted” FS_BASED path can be set up by setting this flag to one. + +
  • Volume Name: This is an internal field and should be set to a space character “ “. + +
  • Mount Point Field: This is an internal field and should be set to a space character “ “. + +
  • Block Size Field: This is used to record the block size of the device and does not need to be set by the user. +
+ +**/ + +/** +\page osalfsfd File Descriptors In Osal + +The OSAL uses abstracted file descriptors. This means that the file descriptors passed back from the OS_open and OS_creat calls will only work with other OSAL OS_* calls. The reasoning for this is as follows: + +Because the OSAL now keeps track of all file descriptors, OSAL specific information can be associated with a specific file descriptor in an OS independent way. For instance, the path of the file that the file descriptor points to can be easily retrieved. Also, the OSAL task ID of the task that opened the file can also be retrieved easily. Both of these pieces of information are very useful when trying to determine statistics for a task, or the entire system. This information can all be retrieved with a single API, OS_FDGetInfo. + +Realizing that we cannot provide all of the file system calls that everyone would need, we also provide the underlying OS's file descriptor for any valid OSAL file descriptor. This way, you can manipulate the underlying file descriptor as needed. + +There are some small drawbacks with the OSAL file descriptors. Because the related information is kept in a table., there is a define called OS_MAX_NUM_OPEN_FILES that defines the maximum number of file descriptors available. This is a configuration parameter, and can be changed to fit your needs. + +Also, if you open or create a file not using the OSAL calls (OS_open or OS_creat) then none of the other OS_* calls that accept a file descriptor as a parameter will work (the results of doing so are undefined). Therefore, if you open a file with the underlying OS's open call, you must continue to use the OS's calls until you close the file descriptor. Be aware that by doing this your software may no longer be OS agnostic. + +**/ \ No newline at end of file diff --git a/docs/src/osal_timer.dox b/docs/src/osal_timer.dox new file mode 100644 index 000000000..7ff825f37 --- /dev/null +++ b/docs/src/osal_timer.dox @@ -0,0 +1,7 @@ +/** +\page osaltimerover Timer Overview + +The timer API is a generic interface to the OS timer facilities. It is implemented using the POSIX timers on Linux and vxWorks and the native timer API on RTEMS. The OS X version is not complete, and will have to be simulated, since the POSIX timer API is not supported on OS X. Cygwin support is TBD. The number of timers supported is controlled by the configuration parameter OS_MAX_TIMERS. + + +**/ \ No newline at end of file diff --git a/docs/src/osalguide.dox b/docs/src/osalguide.dox new file mode 100644 index 000000000..a80dfd521 --- /dev/null +++ b/docs/src/osalguide.dox @@ -0,0 +1,30 @@ +/** + \page osalguide Osal API Guide +
    +
  • Core OS Module
    +
      +
    • \subpage osapi-os-core.h "Core OS Module Reference"
      +
    +
  • OS File System
    +
      +
    • \subpage osalfsovr
      +
    • \subpage osalfsfd
      +
    • \subpage osapi-os-filesys.h "File System Reference"
      +
    +
  • Object File Loader
    +
      +
    • \subpage osapi-os-loader.h "File Loader Reference"
      +
    +
  • Network Module
    +
      +
    • \subpage osapi-os-net.h "Network Module Reference"
      +
    +
  • Timer
    +
      +
    • \subpage osaltimerover
      +
    • \subpage osapi-os-timer.h "Timer Reference"
      +
    +
+ +**/ + diff --git a/docs/src/osalmain.dox b/docs/src/osalmain.dox new file mode 100644 index 000000000..320f970d1 --- /dev/null +++ b/docs/src/osalmain.dox @@ -0,0 +1,50 @@ +/** + \mainpage Osal API Documentation + +
    +
  • General Information and Concepts
    +
      +
    • \subpage osalIntro
      +
    +
  • Core OS Module
    +
      + +
    • \subpage osapi-os-core.h "Core OS Module Reference"
      +
    +
  • OS File System
    +
      +
    • \subpage osalfsovr
      +
    • \subpage osalfsfd
      +
    • \subpage osapi-os-filesys.h "File System Reference"
      +
    +
  • Object File Loader
    +
      +
    • \subpage osapi-os-loader.h "File Loader Reference"
      +
    +
  • Network Module
    +
      +
    • \subpage osapi-os-net.h "Network Module Reference"
      +
    +
  • Timer
    +
      +
    • \subpage osaltimerover
      +
    • \subpage osapi-os-timer.h "Timer Reference"
      +
    +
+**/ + +/** +\page osalIntro OSAL Introduction + +The goal of this library is to promote the creation of portable and reusable real time embedded system software. Given the necessary OS abstraction layer implementations, the same embedded software should compile and run on a number of platforms ranging from spacecraft computer systems to desktop PCs. + +The OS Application Program Interfaces (APIs) are broken up into three major sections: Real Time Operating System APIs, File System APIs, and Interrupt/Exception APIs. The Real Time Operating System APIs cover functionality such as Tasks, Queues, Semaphores, Interrupts, etc. The File System API abstracts the file systems that may be present on a system, and has the ability to simulate multiple embedded file systems on a desktop computer for testing. The Interrupt/Exception APIs are for configuring interrupt and exception handlers. + +Major changes from the first version of this API include the ability to create objects “on the fly”, meaning they do not require a pre-defined ID in order to create them; instead they return the ID of the created object. Also the corresponding delete functions have been added, allowing the user to create and delete OS objects dynamically. Another change has been the removal of functions that were application specific. This release is aimed at generic embedded systems, not necessarily flight software applications. The addition of the file system API is another major addition, along with a method of simulating embedded file systems on a desktop computer. Finally, the parameters and error return codes have been cleaned up for consistency. + +Note on OSAL call restrictions: Each of these calls should be called from a task running in the context of an OSAL application. This means that the startup code should call OS_API_init, and each task/thread that is created should call OS_TaskRegister. In general, these calls should not be called from an ISR. There are a few exceptions, such as the ability to give a binary semaphore from an ISR. + +**/ + + + From db3a0352e2029bdb6d37e6857f3cb83deddb39ba Mon Sep 17 00:00:00 2001 From: Dan Knutsen Date: Tue, 7 Jan 2020 13:47:00 -0500 Subject: [PATCH 7/8] Fix #259, Update tone leap variable --- fsw/cfe-core/src/time/cfe_time_tone.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fsw/cfe-core/src/time/cfe_time_tone.c b/fsw/cfe-core/src/time/cfe_time_tone.c index f00cbc61e..050d82fb8 100644 --- a/fsw/cfe-core/src/time/cfe_time_tone.c +++ b/fsw/cfe-core/src/time/cfe_time_tone.c @@ -141,8 +141,8 @@ void CFE_TIME_ToneSend(void) CFE_MAKE_BIG32(Reference.AtToneSTCF.Seconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneSTCF.Subseconds = CFE_MAKE_BIG32(Reference.AtToneSTCF.Subseconds); - CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeaps = - CFE_MAKE_BIG16(Reference.AtToneLeaps); + CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeapSeconds = + CFE_MAKE_BIG16(Reference.AtToneLeapSeconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneState = CFE_MAKE_BIG16(AtToneState); @@ -288,8 +288,8 @@ int32 CFE_TIME_ToneSendMET(CFE_TIME_SysTime_t NewMET) CFE_MAKE_BIG32(Reference.AtToneSTCF.Seconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneSTCF.Subseconds = CFE_MAKE_BIG32(Reference.AtToneSTCF.Subseconds); - CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeaps = - CFE_MAKE_BIG16(Reference.AtToneLeaps); + CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeapSeconds = + CFE_MAKE_BIG16(Reference.AtToneLeapSeconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneState = CFE_MAKE_BIG16(ClockState); @@ -442,7 +442,7 @@ int32 CFE_TIME_ToneSendGPS(CFE_TIME_SysTime_t NewTime, int16 NewLeaps) CFE_MAKE_BIG32(NewSTCF.Seconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneSTCF.Subseconds = CFE_MAKE_BIG32(NewSTCF.Subseconds); - CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeaps = + CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeapSeconds = CFE_MAKE_BIG16(NewLeaps); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneState = CFE_MAKE_BIG16(ClockState); @@ -595,8 +595,8 @@ int32 CFE_TIME_ToneSendTime(CFE_TIME_SysTime_t NewTime) CFE_MAKE_BIG32(NewSTCF.Seconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneSTCF.Subseconds = CFE_MAKE_BIG32(NewSTCF.Subseconds); - CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeaps = - CFE_MAKE_BIG16(Reference.AtToneLeaps); + CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneLeapSeconds = + CFE_MAKE_BIG16(Reference.AtToneLeapSeconds); CFE_TIME_TaskData.ToneDataCmd.Payload.AtToneState = CFE_MAKE_BIG16(ClockState); @@ -657,7 +657,7 @@ void CFE_TIME_ToneData(const CFE_TIME_ToneDataCmd_Payload_t *ToneDataCmd) CFE_MAKE_BIG32(ToneDataCmd->AtToneSTCF.Seconds); CFE_TIME_TaskData.PendingSTCF.Subseconds = CFE_MAKE_BIG32(ToneDataCmd->AtToneSTCF.Subseconds); - CFE_TIME_TaskData.PendingLeaps = CFE_MAKE_BIG16(ToneDataCmd->AtToneLeaps); + CFE_TIME_TaskData.PendingLeaps = CFE_MAKE_BIG16(ToneDataCmd->AtToneLeapSeconds); CFE_TIME_TaskData.PendingState = CFE_MAKE_BIG16(ToneDataCmd->AtToneState); #else /* !CFE_PLATFORM_TIME_CFG_BIGENDIAN */ From ff54fc363689ff379038fc15b889f95a1def8448 Mon Sep 17 00:00:00 2001 From: anh Date: Wed, 8 Jan 2020 08:37:45 -0500 Subject: [PATCH 8/8] Fix #425, update cppcheck --- fsw/cfe-core/src/es/cfe_es_api.c | 8 ++++---- fsw/cfe-core/src/es/cfe_es_apps.h | 4 ++-- fsw/cfe-core/src/es/cfe_es_cds.c | 6 +++--- fsw/cfe-core/src/es/cfe_es_log.h | 8 ++++---- fsw/cfe-core/src/es/cfe_es_shell.c | 4 ++-- fsw/cfe-core/src/es/cfe_es_start.c | 8 ++++---- fsw/cfe-core/src/es/cfe_es_start.h | 2 +- fsw/cfe-core/src/es/cfe_es_syslog.c | 4 ++-- fsw/cfe-core/src/fs/cfe_fs_api.c | 2 +- fsw/cfe-core/src/fs/cfe_fs_decompress.c | 1 + fsw/cfe-core/src/fs/cfe_fs_priv.c | 2 +- fsw/cfe-core/src/sb/cfe_sb_init.c | 5 ++--- fsw/cfe-core/src/sb/cfe_sb_priv.c | 2 +- fsw/cfe-core/src/sb/cfe_sb_priv.h | 10 +++++----- fsw/cfe-core/src/sb/cfe_sb_task.c | 2 +- fsw/cfe-core/src/sb/cfe_sb_util.c | 2 +- fsw/cfe-core/src/tbl/cfe_tbl_api.c | 18 +++++++++--------- fsw/cfe-core/src/tbl/cfe_tbl_internal.c | 6 +++--- 18 files changed, 47 insertions(+), 47 deletions(-) diff --git a/fsw/cfe-core/src/es/cfe_es_api.c b/fsw/cfe-core/src/es/cfe_es_api.c index db09673b9..adc02d903 100644 --- a/fsw/cfe-core/src/es/cfe_es_api.c +++ b/fsw/cfe-core/src/es/cfe_es_api.c @@ -721,7 +721,7 @@ void CFE_ES_WaitForStartupSync(uint32 TimeOutMilliseconds) */ int32 CFE_ES_RegisterApp(void) { - int32 Result = CFE_SUCCESS; + int32 Result; CFE_ES_LockSharedData(__func__,__LINE__); @@ -1470,7 +1470,7 @@ uint32 CFE_ES_CalculateCRC(const void *DataPtr, uint32 DataLength, uint32 InputC */ int32 CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, int32 BlockSize, const char *Name) { - int32 Status = CFE_SUCCESS; + int32 Status; size_t NameLen = 0; uint32 ThisAppId = 0; @@ -1550,7 +1550,7 @@ int32 CFE_ES_RegisterCDS(CFE_ES_CDSHandle_t *CDSHandlePtr, int32 BlockSize, cons */ int32 CFE_ES_CopyToCDS(CFE_ES_CDSHandle_t Handle, void *DataToCopy) { - int32 Status = CFE_SUCCESS; + int32 Status; Status = CFE_ES_CDSBlockWrite(CFE_ES_Global.CDSVars.Registry[Handle].MemHandle, DataToCopy); @@ -1565,7 +1565,7 @@ int32 CFE_ES_CopyToCDS(CFE_ES_CDSHandle_t Handle, void *DataToCopy) */ int32 CFE_ES_RestoreFromCDS(void *RestoreToMemory, CFE_ES_CDSHandle_t Handle) { - int32 Status = CFE_SUCCESS; + int32 Status; Status = CFE_ES_CDSBlockRead(RestoreToMemory, CFE_ES_Global.CDSVars.Registry[Handle].MemHandle); diff --git a/fsw/cfe-core/src/es/cfe_es_apps.h b/fsw/cfe-core/src/es/cfe_es_apps.h index 87bff26ae..514e68b51 100644 --- a/fsw/cfe-core/src/es/cfe_es_apps.h +++ b/fsw/cfe-core/src/es/cfe_es_apps.h @@ -174,9 +174,9 @@ int32 CFE_ES_AppCreate(uint32 *ApplicationIdPtr, ** Internal function to load a a new cFE shared Library */ int32 CFE_ES_LoadLibrary(uint32 *LibraryIdPtr, - const char *Path, + const char *FileName, const void *EntryPointData, - const char *Name); + const char *LibName); /* ** Get Application List diff --git a/fsw/cfe-core/src/es/cfe_es_cds.c b/fsw/cfe-core/src/es/cfe_es_cds.c index 3c7ee8056..42c3c83bd 100644 --- a/fsw/cfe-core/src/es/cfe_es_cds.c +++ b/fsw/cfe-core/src/es/cfe_es_cds.c @@ -149,7 +149,7 @@ int32 CFE_ES_RebuildCDS(void); int32 CFE_ES_CDS_EarlyInit(void) { uint32 MinRequiredSize = 0; - int32 Status = CFE_SUCCESS; + int32 Status; /* Compute the minimum size required for the CDS with the current configuration of the cFE */ MinRequiredSize = (sizeof(CFE_ES_Global.CDSVars.ValidityField) * 2) + /* Minimum size for validity fields */ @@ -512,7 +512,7 @@ int32 CFE_ES_InitCDSRegistry(void) int32 CFE_ES_UpdateCDSRegistry(void) { - int32 Status = CFE_SUCCESS; + int32 Status; /* Copy the contents of the local registry to the CDS */ Status = CFE_PSP_WriteToCDS(CFE_ES_Global.CDSVars.Registry, @@ -696,7 +696,7 @@ int32 CFE_ES_FindFreeCDSRegistryEntry(void) int32 CFE_ES_RebuildCDS(void) { - int32 Status = CFE_SUCCESS; + int32 Status; int32 PoolOffset; /* First, determine if the CDS registry stored in the CDS is smaller or equal */ diff --git a/fsw/cfe-core/src/es/cfe_es_log.h b/fsw/cfe-core/src/es/cfe_es_log.h index 2ddbd29fa..df8de9466 100644 --- a/fsw/cfe-core/src/es/cfe_es_log.h +++ b/fsw/cfe-core/src/es/cfe_es_log.h @@ -239,19 +239,19 @@ void CFE_ES_SysLogReadData(CFE_ES_SysLogReadBuffer_t *Buffer); * The operating mode of the system log controls its behavior once filled to the point * where additional messages can no longer be stored. * - * If "LogMode" is set to DISCARD, then the message will be truncated + * If "Mode" is set to DISCARD, then the message will be truncated * to fit in the available space, or completely discarded if no space exists. * - * If "LogMode" is set to OVERWRITE, then the oldest message(s) in the + * If "Mode" is set to OVERWRITE, then the oldest message(s) in the * system log will be overwritten with this new message. * * \note Switching from OVERWRITE to DISCARD mode may take effect immediately, as the * setting only takes effect when the buffer "wrap-point" is reached at the end. * - * \param LogMode The desired operating mode + * \param Mode The desired operating mode * \return CFE_SUCCESS if set successfully */ -int32 CFE_ES_SysLogSetMode(CFE_ES_LogMode_Enum_t LogMode); +int32 CFE_ES_SysLogSetMode(CFE_ES_LogMode_Enum_t Mode); /** * \brief Format a message intended for output to the system log diff --git a/fsw/cfe-core/src/es/cfe_es_shell.c b/fsw/cfe-core/src/es/cfe_es_shell.c index 39c4a72e5..210cc6e58 100644 --- a/fsw/cfe-core/src/es/cfe_es_shell.c +++ b/fsw/cfe-core/src/es/cfe_es_shell.c @@ -282,7 +282,7 @@ int32 CFE_ES_ListTasks(int32 fd) * length defined by osconfig. */ char Line [96 + (OS_MAX_API_NAME * 2)]; - int32 Result = CFE_SUCCESS; + int32 Result; CFE_ES_TaskInfo_t TaskInfo; /* Make sure we start at the beginning of the file */ @@ -356,7 +356,7 @@ static void CFE_ES_ShellCountObjectCallback(uint32 object_id, void *arg) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ int32 CFE_ES_ListResources(int32 fd) { - int32 Result = CFE_SUCCESS; + int32 Result; int32 NumSemaphores = 0; int32 NumCountSems =0; int32 NumMutexes = 0; diff --git a/fsw/cfe-core/src/es/cfe_es_start.c b/fsw/cfe-core/src/es/cfe_es_start.c index 61c9eb09e..dea7ac802 100644 --- a/fsw/cfe-core/src/es/cfe_es_start.c +++ b/fsw/cfe-core/src/es/cfe_es_start.c @@ -48,7 +48,7 @@ #include #include -static int32 CFE_ES_MainTaskSyncDelay(uint32 AppMinState, uint32 TimeOutMilliseconds); +static int32 CFE_ES_MainTaskSyncDelay(uint32 AppStateId, uint32 TimeOutMilliseconds); /***************************************************************************/ @@ -480,7 +480,7 @@ void CFE_ES_SetupResetVariables(uint32 StartType, uint32 StartSubtype, uint32 Bo ** Purpose: This function initializes the file systems used in the cFE core. ** */ -void CFE_ES_InitializeFileSystems(uint32 start_type) +void CFE_ES_InitializeFileSystems(uint32 StartType) { int32 RetStatus; cpuaddr RamDiskMemoryAddress; @@ -513,7 +513,7 @@ void CFE_ES_InitializeFileSystems(uint32 start_type) ** Next, either format, or just initialize the RAM disk depending on ** the reset type */ - if ( start_type == CFE_PSP_RST_TYPE_POWERON ) + if ( StartType == CFE_PSP_RST_TYPE_POWERON ) { RetStatus = OS_mkfs((void *)RamDiskMemoryAddress, "/ramdev0", "RAM", CFE_PLATFORM_ES_RAM_DISK_SECTOR_SIZE, CFE_PLATFORM_ES_RAM_DISK_NUM_SECTORS ); if ( RetStatus != OS_FS_SUCCESS ) @@ -584,7 +584,7 @@ void CFE_ES_InitializeFileSystems(uint32 start_type) ** Note: When CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED is set to 0, this feature is ** disabled. */ - if ((start_type == CFE_PSP_RST_TYPE_PROCESSOR) && (CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED > 0)) + if ((StartType == CFE_PSP_RST_TYPE_PROCESSOR) && (CFE_PLATFORM_ES_RAM_DISK_PERCENT_RESERVED > 0)) { /* ** See how many blocks are free in the RAM disk diff --git a/fsw/cfe-core/src/es/cfe_es_start.h b/fsw/cfe-core/src/es/cfe_es_start.h index 95cb0e9b0..f6ea7c210 100644 --- a/fsw/cfe-core/src/es/cfe_es_start.h +++ b/fsw/cfe-core/src/es/cfe_es_start.h @@ -93,7 +93,7 @@ extern CFE_ES_ObjectTable_t CFE_ES_ObjectTable[CFE_PLATFORM_ES_OBJECT_TABLE_SIZE extern void CFE_ES_CreateObjects(void); extern void CFE_ES_SetupResetVariables(uint32 StartType, uint32 StartSubtype, uint32 BootSource); extern void CFE_ES_InitializeFileSystems(uint32 StartType); -extern void CFE_ES_SetupPerfVariables(uint32 StartType); +extern void CFE_ES_SetupPerfVariables(uint32 ResetType); #endif /* _cfe_es_start_ */ diff --git a/fsw/cfe-core/src/es/cfe_es_syslog.c b/fsw/cfe-core/src/es/cfe_es_syslog.c index b1e89fd3f..2a9488682 100644 --- a/fsw/cfe-core/src/es/cfe_es_syslog.c +++ b/fsw/cfe-core/src/es/cfe_es_syslog.c @@ -373,7 +373,7 @@ int32 CFE_ES_SysLogSetMode(CFE_ES_LogMode_Enum_t Mode) * with arguments similar to the "vsnprintf()" C library API call * ----------------------------------------------------------------- */ -void CFE_ES_SysLog_vsnprintf(char *Buffer, size_t BufferSize, const char *SpecStringPtr, va_list ap) +void CFE_ES_SysLog_vsnprintf(char *Buffer, size_t BufferSize, const char *SpecStringPtr, va_list ArgPtr) { size_t StringLen; size_t MaxLen; @@ -405,7 +405,7 @@ void CFE_ES_SysLog_vsnprintf(char *Buffer, size_t BufferSize, const char *SpecSt ++StringLen; /* note that vsnprintf() may return a size larger than the buffer, if it truncates. */ - PrintLen = vsnprintf(&Buffer[StringLen], BufferSize - StringLen, SpecStringPtr, ap); + PrintLen = vsnprintf(&Buffer[StringLen], BufferSize - StringLen, SpecStringPtr, ArgPtr); if (PrintLen > 0) { StringLen += PrintLen; diff --git a/fsw/cfe-core/src/fs/cfe_fs_api.c b/fsw/cfe-core/src/fs/cfe_fs_api.c index 4bf7c21a8..468a1772c 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_api.c +++ b/fsw/cfe-core/src/fs/cfe_fs_api.c @@ -166,7 +166,7 @@ int32 CFE_FS_WriteHeader(int32 FileDes, CFE_FS_Header_t *Hdr) int32 CFE_FS_SetTimestamp(int32 FileDes, CFE_TIME_SysTime_t NewTimestamp) { - int32 Result = OS_FS_SUCCESS; + int32 Result; CFE_FS_Header_t TempHdr; int32 EndianCheck = 0x01020304; CFE_TIME_SysTime_t OutTimestamp = NewTimestamp; diff --git a/fsw/cfe-core/src/fs/cfe_fs_decompress.c b/fsw/cfe-core/src/fs/cfe_fs_decompress.c index 4d6bc5419..915563a5e 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_decompress.c +++ b/fsw/cfe-core/src/fs/cfe_fs_decompress.c @@ -203,6 +203,7 @@ int32 FS_gz_eat_header_Reentrant( CFE_FS_Decompress_State_t *State ) if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; stamp |= (uint32)NEXTBYTE() << 16; if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; + /* cppcheck-suppress unreadVariable */ stamp |= (uint32)NEXTBYTE() << 24; if( State->Error != CFE_SUCCESS ) return CFE_FS_GZIP_READ_ERROR_HEADER; diff --git a/fsw/cfe-core/src/fs/cfe_fs_priv.c b/fsw/cfe-core/src/fs/cfe_fs_priv.c index bfe0f64d4..8884cec67 100644 --- a/fsw/cfe-core/src/fs/cfe_fs_priv.c +++ b/fsw/cfe-core/src/fs/cfe_fs_priv.c @@ -63,7 +63,7 @@ CFE_FS_t CFE_FS; */ int32 CFE_FS_EarlyInit (void) { - int32 Stat = CFE_SUCCESS; + int32 Stat; Stat = OS_MutSemCreate(&CFE_FS.SharedDataMutexId, "CFE_FS_SharedMutex", 0); if( Stat != OS_SUCCESS ) diff --git a/fsw/cfe-core/src/sb/cfe_sb_init.c b/fsw/cfe-core/src/sb/cfe_sb_init.c index e733def16..562a3df55 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_init.c +++ b/fsw/cfe-core/src/sb/cfe_sb_init.c @@ -85,7 +85,7 @@ uint32 CFE_SB_MemPoolDefSize[CFE_ES_MAX_MEMPOOL_BLOCK_SIZES] = */ int32 CFE_SB_EarlyInit (void) { - int32 Stat = CFE_SUCCESS; + int32 Stat; CFE_SB_Default_Qos.Priority = CFE_SB_QOS_LOW_PRIORITY; CFE_SB_Default_Qos.Reliability = CFE_SB_QOS_LOW_RELIABILITY; @@ -217,9 +217,8 @@ void CFE_SB_InitPipeTbl(void){ */ void CFE_SB_InitMsgMap(void){ - CFE_SB_MsgKey_Atom_t KeyVal; - #ifdef MESSAGE_FORMAT_IS_CCSDS + CFE_SB_MsgKey_Atom_t KeyVal; for (KeyVal=0; KeyVal < CFE_SB_MAX_NUMBER_OF_MSG_KEYS; KeyVal++) { diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.c b/fsw/cfe-core/src/sb/cfe_sb_priv.c index 53ef68d6c..524055db3 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.c +++ b/fsw/cfe-core/src/sb/cfe_sb_priv.c @@ -705,9 +705,9 @@ char *CFE_SB_GetAppTskName(uint32 TaskId,char *FullName){ */ uint8 CFE_SB_GetPktType(CFE_SB_MsgId_t MsgId) { - CFE_SB_MsgId_Atom_t Val = MsgId; #ifdef MESSAGE_FORMAT_IS_CCSDS + CFE_SB_MsgId_Atom_t Val = MsgId; #ifndef MESSAGE_FORMAT_IS_CCSDS_VER_2 return CFE_TST(Val,12); diff --git a/fsw/cfe-core/src/sb/cfe_sb_priv.h b/fsw/cfe-core/src/sb/cfe_sb_priv.h index c580f673d..791ed10f0 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_priv.h +++ b/fsw/cfe-core/src/sb/cfe_sb_priv.h @@ -351,8 +351,8 @@ CFE_SB_MsgKey_t CFE_SB_ConvertMsgIdtoMsgKey(CFE_SB_MsgId_t MsgId); void CFE_SB_LockSharedData(const char *FuncName, int32 LineNumber); void CFE_SB_UnlockSharedData(const char *FuncName, int32 LineNumber); void CFE_SB_ReleaseBuffer (CFE_SB_BufferD_t *bd, CFE_SB_DestinationD_t *dest); -int32 CFE_SB_ReadQueue(CFE_SB_PipeD_t *pd,uint32 TskId, - CFE_SB_TimeOut_t time_out,CFE_SB_BufferD_t **message ); +int32 CFE_SB_ReadQueue(CFE_SB_PipeD_t *PipeDscPtr,uint32 TskId, + CFE_SB_TimeOut_t Time_Out,CFE_SB_BufferD_t **Message ); int32 CFE_SB_WriteQueue(CFE_SB_PipeD_t *pd,uint32 TskId, const CFE_SB_BufferD_t *bd,CFE_SB_MsgId_t MsgId ); CFE_SB_MsgRouteIdx_t CFE_SB_GetRoutingTblIdx(CFE_SB_MsgKey_t MsgKey); @@ -366,7 +366,7 @@ void CFE_SB_ResetCounters(void); char *CFE_SB_GetPipeName(CFE_SB_PipeId_t PipeId); void CFE_SB_SetMsgSeqCnt(CFE_SB_MsgPtr_t MsgPtr,uint32 Count); char *CFE_SB_GetAppTskName(uint32 TaskId, char* FullName); -CFE_SB_BufferD_t *CFE_SB_GetBufferFromPool(CFE_SB_MsgId_t MsgId, uint16 size); +CFE_SB_BufferD_t *CFE_SB_GetBufferFromPool(CFE_SB_MsgId_t MsgId, uint16 Size); CFE_SB_BufferD_t *CFE_SB_GetBufferFromCaller(CFE_SB_MsgId_t MsgId, void *Address); CFE_SB_PipeD_t *CFE_SB_GetPipePtr(CFE_SB_PipeId_t PipeId); CFE_SB_PipeId_t CFE_SB_GetAvailPipeIdx(void); @@ -402,8 +402,8 @@ uint32 CFE_SB_RequestToSendEvent(uint32 TaskId, uint32 Bit); void CFE_SB_FinishSendEvent(uint32 TaskId, uint32 Bit); CFE_SB_DestinationD_t *CFE_SB_GetDestinationBlk(void); int32 CFE_SB_PutDestinationBlk(CFE_SB_DestinationD_t *Dest); -int32 CFE_SB_AddDest(CFE_SB_RouteEntry_t *RouteEntry, CFE_SB_DestinationD_t *Dest); -int32 CFE_SB_RemoveDest(CFE_SB_RouteEntry_t *RouteEntry, CFE_SB_DestinationD_t *Dest); +int32 CFE_SB_AddDest(CFE_SB_RouteEntry_t *RouteEntry, CFE_SB_DestinationD_t *NewNode); +int32 CFE_SB_RemoveDest(CFE_SB_RouteEntry_t *RouteEntry, CFE_SB_DestinationD_t *NodeToRemove); /*****************************************************************************/ diff --git a/fsw/cfe-core/src/sb/cfe_sb_task.c b/fsw/cfe-core/src/sb/cfe_sb_task.c index 69bd9eea1..37466f532 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_task.c +++ b/fsw/cfe-core/src/sb/cfe_sb_task.c @@ -137,7 +137,7 @@ int32 CFE_SB_AppInit(void){ uint32 CfgFileEventsToFilter = 0; uint32 *TmpPtr = NULL; - int32 Status = CFE_SUCCESS; + int32 Status; Status = CFE_ES_RegisterApp(); diff --git a/fsw/cfe-core/src/sb/cfe_sb_util.c b/fsw/cfe-core/src/sb/cfe_sb_util.c index 63c9e9882..96fffc550 100644 --- a/fsw/cfe-core/src/sb/cfe_sb_util.c +++ b/fsw/cfe-core/src/sb/cfe_sb_util.c @@ -109,10 +109,10 @@ void CFE_SB_InitMsg(void *MsgPtr, */ uint16 CFE_SB_MsgHdrSize(const CFE_SB_Msg_t *MsgPtr) { - uint16 size; #ifdef MESSAGE_FORMAT_IS_CCSDS + uint16 size; const CCSDS_PriHdr_t *HdrPtr; HdrPtr = (const CCSDS_PriHdr_t *) MsgPtr; diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_api.c b/fsw/cfe-core/src/tbl/cfe_tbl_api.c index 6f0f7053b..86cabdee8 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_api.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_api.c @@ -62,7 +62,7 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr, CFE_TBL_RegistryRec_t *RegRecPtr = NULL; CFE_TBL_LoadBuff_t *WorkingBufferPtr; CFE_TBL_CritRegRec_t *CritRegRecPtr = NULL; - int32 Status = CFE_SUCCESS; + int32 Status; size_t NameLen = 0; int16 RegIndx = -1; uint32 ThisAppId; @@ -516,7 +516,7 @@ int32 CFE_TBL_Register( CFE_TBL_Handle_t *TblHandlePtr, int32 CFE_TBL_Share( CFE_TBL_Handle_t *TblHandlePtr, const char *TblName ) { - int32 Status = CFE_SUCCESS; + int32 Status; uint32 ThisAppId; int16 RegIndx = CFE_TBL_NOT_FOUND; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; @@ -1048,7 +1048,7 @@ int32 CFE_TBL_Update( CFE_TBL_Handle_t TblHandle ) int32 CFE_TBL_GetAddress( void **TblPtr, CFE_TBL_Handle_t TblHandle ) { - int32 Status = CFE_SUCCESS; + int32 Status; uint32 ThisAppId; /* Assume failure at returning the table address */ @@ -1124,7 +1124,7 @@ int32 CFE_TBL_GetAddresses( void **TblPtrs[], const CFE_TBL_Handle_t TblHandles[] ) { uint16 i; - int32 Status = CFE_SUCCESS; + int32 Status; uint32 ThisAppId; /* Assume failure at returning the table addresses */ @@ -1203,7 +1203,7 @@ int32 CFE_TBL_ReleaseAddresses( uint16 NumTables, int32 CFE_TBL_Validate( CFE_TBL_Handle_t TblHandle ) { - int32 Status = CFE_SUCCESS; + int32 Status; uint32 ThisAppId; CFE_TBL_RegistryRec_t *RegRecPtr; CFE_TBL_AccessDescriptor_t *AccessDescPtr; @@ -1416,7 +1416,7 @@ int32 CFE_TBL_Manage( CFE_TBL_Handle_t TblHandle ) int32 CFE_TBL_GetStatus( CFE_TBL_Handle_t TblHandle ) { - int32 Status = CFE_SUCCESS; + int32 Status ; uint32 ThisAppId; CFE_TBL_RegistryRec_t *RegRecPtr; CFE_TBL_AccessDescriptor_t *AccessDescPtr; @@ -1521,7 +1521,7 @@ int32 CFE_TBL_GetInfo( CFE_TBL_Info_t *TblInfoPtr, const char *TblName ) int32 CFE_TBL_DumpToBuffer( CFE_TBL_Handle_t TblHandle ) { - int32 Status = CFE_SUCCESS; + int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; CFE_TBL_RegistryRec_t *RegRecPtr = NULL; CFE_TBL_DumpControl_t *DumpCtrlPtr = NULL; @@ -1565,7 +1565,7 @@ int32 CFE_TBL_DumpToBuffer( CFE_TBL_Handle_t TblHandle ) int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle ) { - int32 Status = CFE_SUCCESS; + int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; CFE_TBL_RegistryRec_t *RegRecPtr = NULL; CFE_TBL_Handle_t AccessIterator; @@ -1642,7 +1642,7 @@ int32 CFE_TBL_Modified( CFE_TBL_Handle_t TblHandle ) int32 CFE_TBL_NotifyByMessage(CFE_TBL_Handle_t TblHandle, CFE_SB_MsgId_t MsgId, uint16 CommandCode, uint32 Parameter) { - int32 Status = CFE_SUCCESS; + int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr = NULL; CFE_TBL_RegistryRec_t *RegRecPtr = NULL; uint32 ThisAppId; diff --git a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c index f9ede034e..45304d4f4 100644 --- a/fsw/cfe-core/src/tbl/cfe_tbl_internal.c +++ b/fsw/cfe-core/src/tbl/cfe_tbl_internal.c @@ -377,7 +377,7 @@ int32 CFE_TBL_ValidateAppID(uint32 *AppIdPtr) int32 CFE_TBL_ValidateAccess(CFE_TBL_Handle_t TblHandle, uint32 *AppIdPtr) { - int32 Status = CFE_SUCCESS; + int32 Status; /* Check to make sure App ID is legit */ Status = CFE_TBL_ValidateAppID(AppIdPtr); @@ -537,7 +537,7 @@ int32 CFE_TBL_RemoveAccessLink(CFE_TBL_Handle_t TblHandle) int32 CFE_TBL_GetAddressInternal(void **TblPtr, CFE_TBL_Handle_t TblHandle, uint32 ThisAppId) { - int32 Status = CFE_SUCCESS; + int32 Status; CFE_TBL_AccessDescriptor_t *AccessDescPtr; CFE_TBL_RegistryRec_t *RegRecPtr; @@ -1460,7 +1460,7 @@ void CFE_TBL_UpdateCriticalTblCDS(CFE_TBL_RegistryRec_t *RegRecPtr) { CFE_TBL_CritRegRec_t *CritRegRecPtr = NULL; - int32 Status = CFE_SUCCESS; + int32 Status; /* Copy an image of the updated table to the CDS for safekeeping */ Status = CFE_ES_CopyToCDS(RegRecPtr->CDSHandle, RegRecPtr->Buffers[RegRecPtr->ActiveBufferIndex].BufferPtr);