From 05af21e98d737826b12a654d94c1b61e57edcb38 Mon Sep 17 00:00:00 2001 From: Jacob Hageman Date: Mon, 16 May 2022 10:20:44 -0600 Subject: [PATCH 1/2] Fix #342, Resolve uninit var static analysis warning --- fsw/pc-linux/src/cfe_psp_start.c | 2 ++ .../timebase_vxworks/src/coveragetest-timebase_vxworks.c | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/fsw/pc-linux/src/cfe_psp_start.c b/fsw/pc-linux/src/cfe_psp_start.c index a7c906f3..82b2a9ce 100644 --- a/fsw/pc-linux/src/cfe_psp_start.c +++ b/fsw/pc-linux/src/cfe_psp_start.c @@ -153,6 +153,8 @@ int32 CFE_PSP_OS_EventHandler(OS_Event_t event, osal_id_t object_id, void *data) { char taskname[OS_MAX_API_NAME]; + memset(taskname, 0, sizeof(taskname)); + switch (event) { case OS_EVENT_RESOURCE_ALLOCATED: diff --git a/unit-test-coverage/modules/timebase_vxworks/src/coveragetest-timebase_vxworks.c b/unit-test-coverage/modules/timebase_vxworks/src/coveragetest-timebase_vxworks.c index b172ffad..4f09d71b 100644 --- a/unit-test-coverage/modules/timebase_vxworks/src/coveragetest-timebase_vxworks.c +++ b/unit-test-coverage/modules/timebase_vxworks/src/coveragetest-timebase_vxworks.c @@ -82,6 +82,8 @@ void Test_Nominal(void) OS_time_t OsTime; PSP_VxWorks_TimeBaseVal_t VxTime; + memset(&OsTime, 0, sizeof(OsTime)); + /* Nominal test with a simple 1:1 ratio */ UT_PSP_TIMEBASE_VXWORKS_TESTCONFIG.PeriodNumerator = 1; UT_PSP_TIMEBASE_VXWORKS_TESTCONFIG.PeriodDenominator = 1; @@ -103,6 +105,8 @@ void Test_Non_Reducible(void) PSP_VxWorks_TimeBaseVal_t VxTime; int64 TestTime; + memset(&OsTime, 0, sizeof(OsTime)); + /* Use an oddball ratio of of some primes, will not be reducible */ /* Ratio is 43*3 / 53*2 => 129/106 */ /* This translates to about ~1.217ns per tick */ @@ -136,6 +140,8 @@ void Test_Reducible_1(void) PSP_VxWorks_TimeBaseVal_t VxTime; int64 TestTime; + memset(&OsTime, 0, sizeof(OsTime)); + /* Test with a ratio that is also 1:1, but can be reduced */ UT_PSP_TIMEBASE_VXWORKS_TESTCONFIG.PeriodNumerator = 1000; UT_PSP_TIMEBASE_VXWORKS_TESTCONFIG.PeriodDenominator = 1000; @@ -164,6 +170,8 @@ void Test_Reducible_2(void) PSP_VxWorks_TimeBaseVal_t VxTime; int64 TestTime; + memset(&OsTime, 0, sizeof(OsTime)); + /* Test with a ratio that can be reduced */ /* Final reduced ratio should be 12:5 with 100ns OS ticks */ UT_PSP_TIMEBASE_VXWORKS_TESTCONFIG.PeriodNumerator = 84000; From 7ca0ee5047a8bba5e84cca08b0e88123d7880596 Mon Sep 17 00:00:00 2001 From: "Gerardo E. Cruz-Ortiz" <59618057+astrogeco@users.noreply.github.com> Date: Tue, 31 May 2022 12:53:09 -0400 Subject: [PATCH 2/2] IC:Caelum-rc4+dev10, psp v1.6.0-rc4+dev38 - Resolve uninit var static analysis warning - See and --- README.md | 6 +++++- fsw/mcp750-vxworks/inc/psp_version.h | 2 +- fsw/pc-linux/inc/psp_version.h | 2 +- fsw/pc-rtems/inc/psp_version.h | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35121843..1db2e20c 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,12 @@ This is a collection of APIs abstracting platform specific functionality to be l ## Version History +### Development Build: v1.6.0-rc4+dev38 -### Development Build: v1.6.0-rc4+34 +- Resolve uninit var static analysis warning +- See and + +### Development Build: v1.6.0-rc4+dev34 - Update codeql workflow for reusable updates - Add cpu affinity example diff --git a/fsw/mcp750-vxworks/inc/psp_version.h b/fsw/mcp750-vxworks/inc/psp_version.h index e9066bac..ea09fa94 100644 --- a/fsw/mcp750-vxworks/inc/psp_version.h +++ b/fsw/mcp750-vxworks/inc/psp_version.h @@ -27,7 +27,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 34 +#define CFE_PSP_IMPL_BUILD_NUMBER 38 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4" /* diff --git a/fsw/pc-linux/inc/psp_version.h b/fsw/pc-linux/inc/psp_version.h index e9066bac..ea09fa94 100644 --- a/fsw/pc-linux/inc/psp_version.h +++ b/fsw/pc-linux/inc/psp_version.h @@ -27,7 +27,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 34 +#define CFE_PSP_IMPL_BUILD_NUMBER 38 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4" /* diff --git a/fsw/pc-rtems/inc/psp_version.h b/fsw/pc-rtems/inc/psp_version.h index e9066bac..ea09fa94 100644 --- a/fsw/pc-rtems/inc/psp_version.h +++ b/fsw/pc-rtems/inc/psp_version.h @@ -27,7 +27,7 @@ /* * Development Build Macro Definitions */ -#define CFE_PSP_IMPL_BUILD_NUMBER 34 +#define CFE_PSP_IMPL_BUILD_NUMBER 38 #define CFE_PSP_IMPL_BUILD_BASELINE "v1.6.0-rc4" /*