Skip to content

Commit

Permalink
Merge pull request #1956 from skliper/fix1955-func_data_nonzero
Browse files Browse the repository at this point in the history
Fix #1955, Add static local to function test so data section is nonzero
  • Loading branch information
astrogeco authored Sep 21, 2021
2 parents f443ce3 + 1f4f993 commit 0a40c5b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/cfe_testcase/src/cfe_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ CFE_FT_Global_t CFE_FT_Global;
*/
void CFE_TestMain(void)
{
/* Static local so data section is not zero when checking app info */
static char TestName[] = "CFE API";

/* Constant Table information used by all table tests */
CFE_FT_Global.TblName = "TestTable";
CFE_FT_Global.RegisteredTblName = "CFE_TEST_APP.TestTable";
Expand All @@ -52,7 +55,7 @@ void CFE_TestMain(void)
* Note this also waits for the appropriate overall system
* state and gets ownership of the UtAssert subsystem
*/
CFE_Assert_RegisterTest("CFE API");
CFE_Assert_RegisterTest(TestName);
CFE_Assert_OpenLogFile(CFE_ASSERT_LOG_FILE_NAME);

/*
Expand Down

0 comments on commit 0a40c5b

Please sign in to comment.