Skip to content

Commit 93ef558

Browse files
kar-rahul-awsSkptakchinglee-iotaggarg
authored
Declare variable without initializer (FreeRTOS#841)
Co-authored-by: Soren Ptak <[email protected]> Co-authored-by: chinglee-iot <[email protected]> Co-authored-by: Gaurav-Aggarwal-AWS <[email protected]>
1 parent 51437bf commit 93ef558

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tasks.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7412,7 +7412,8 @@ static void prvResetNextTaskUnblockTime( void )
74127412
int iSnprintfReturnValue;
74137413
BaseType_t xOutputBufferFull = pdFALSE;
74147414
UBaseType_t uxArraySize, x;
7415-
configRUN_TIME_COUNTER_TYPE ulTotalTime, ulStatsAsPercentage;
7415+
configRUN_TIME_COUNTER_TYPE ulTotalTime = 0;
7416+
configRUN_TIME_COUNTER_TYPE ulStatsAsPercentage;
74167417

74177418
traceENTER_vTaskGetRunTimeStatistics( pcWriteBuffer, uxBufferLength );
74187419

timers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,12 +943,12 @@
943943

944944
static void prvProcessReceivedCommands( void )
945945
{
946-
DaemonTaskMessage_t xMessage;
946+
DaemonTaskMessage_t xMessage = { 0 };
947947
Timer_t * pxTimer;
948948
BaseType_t xTimerListsWereSwitched;
949949
TickType_t xTimeNow;
950950

951-
while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */
951+
while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL )
952952
{
953953
#if ( INCLUDE_xTimerPendFunctionCall == 1 )
954954
{

0 commit comments

Comments
 (0)