Skip to content

Commit

Permalink
Merge pull request #507 from jphickey/fix-505-ut-timebase-warnings
Browse files Browse the repository at this point in the history
Fix #505, warnings in time base API test
  • Loading branch information
astrogeco authored Jun 23, 2020
2 parents 9cfdbff + cbaaf5a commit 9157dde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tests/time-base-api-test/time-base-api-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ void TestTimeBaseApi(void)
/* Checking OS_MAX_TIMEBASES + 1 */
for ( int i = 0; i < OS_MAX_TIMEBASES; i++ )
{
snprintf(TimeBaseIter[i], 12, "TimeBase%d", i);
snprintf(TimeBaseIter[i], sizeof(TimeBaseIter[i]), "TimeBase%d", i);
tbc_results[i] = OS_TimeBaseCreate(&tb_id[i], TimeBaseIter[i], 0);
}
TimeBaseNum = OS_MAX_TIMEBASES+1;
snprintf(overMaxTimeBase, 12, "TimeBase%d", TimeBaseNum);
snprintf(overMaxTimeBase, sizeof(overMaxTimeBase), "TimeBase%d", (int)TimeBaseNum);
expected = OS_ERR_NO_FREE_IDS;
actual= OS_TimeBaseCreate(&time_base_id, "overMaxTimeBase", 0);
UtAssert_True(actual == expected, "OS_TimeBaseCreate() (%ld) == OS_ERR_NO_FREE_IDS", (long)actual);
Expand Down

0 comments on commit 9157dde

Please sign in to comment.