From cd0b0ecf39b18583ac53489d339c32855de55db2 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 4 Sep 2023 21:26:47 -0400 Subject: [PATCH] Fix #58, add memset for uninitialized local This variable is not actually read by the function under test, but memset to 0 squelches a warning about it. --- unit-test/hk_app_tests.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unit-test/hk_app_tests.c b/unit-test/hk_app_tests.c index 5544516..edb0c5d 100644 --- a/unit-test/hk_app_tests.c +++ b/unit-test/hk_app_tests.c @@ -1016,6 +1016,8 @@ void Test_HK_ResetCountersCmd(void) char ExpectedEventString[CFE_MISSION_EVS_MAX_MESSAGE_LENGTH]; snprintf(ExpectedEventString, CFE_MISSION_EVS_MAX_MESSAGE_LENGTH, "HK Reset Counters command received"); + memset(&Buf, 0, sizeof(Buf)); + /* Act */ HK_ResetCountersCmd(&Buf);