Skip to content

Commit cf4ff12

Browse files
pierrenoel-bouteville-actPierre-Noel Bouteville
and
Pierre-Noel Bouteville
authored
tasks.c:2067:11: warning: this condition has identical branches [-Wduplicated-branches] (#482)
* replace duplicated if branch because empty by a comment to avoid warning/error with option GCC -Wduplicated-branches * Missing ';' * cosmetic comment * update comment as suggested by Gaurav-Aggarwal-AWS * cosmetic Co-authored-by: Pierre-Noel Bouteville <[email protected]>
1 parent b5b1ff0 commit cf4ff12

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

tasks.c

+8-9
Original file line numberDiff line numberDiff line change
@@ -2064,15 +2064,14 @@ void vTaskStartScheduler( void )
20642064

20652065
/* Setting up the timer tick is hardware specific and thus in the
20662066
* portable interface. */
2067-
if( xPortStartScheduler() != pdFALSE )
2068-
{
2069-
/* Should not reach here as if the scheduler is running the
2070-
* function will not return. */
2071-
}
2072-
else
2073-
{
2074-
/* Should only reach here if a task calls xTaskEndScheduler(). */
2075-
}
2067+
xPortStartScheduler();
2068+
2069+
/* In most cases, xPortStartScheduler() will not return. If it
2070+
* returns pdTRUE then there was not enough heap memory available
2071+
* to create either the Idle or the Timer task. If it returned
2072+
* pdFALSE, then the application called xTaskEndScheduler().
2073+
* Most ports don't implement xTaskEndScheduler() as there is
2074+
* nothing to return to. */
20762075
}
20772076
else
20782077
{

0 commit comments

Comments
 (0)