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 <pnb990@gmail.com>
This commit is contained in:
pierrenoel-bouteville-act 2022-04-06 20:08:44 +02:00 committed by GitHub
parent b5b1ff02dd
commit cf4ff121a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

17
tasks.c
View file

@ -2064,15 +2064,14 @@ void vTaskStartScheduler( void )
/* Setting up the timer tick is hardware specific and thus in the /* Setting up the timer tick is hardware specific and thus in the
* portable interface. */ * portable interface. */
if( xPortStartScheduler() != pdFALSE ) xPortStartScheduler();
{
/* Should not reach here as if the scheduler is running the /* In most cases, xPortStartScheduler() will not return. If it
* function will not return. */ * returns pdTRUE then there was not enough heap memory available
} * to create either the Idle or the Timer task. If it returned
else * pdFALSE, then the application called xTaskEndScheduler().
{ * Most ports don't implement xTaskEndScheduler() as there is
/* Should only reach here if a task calls xTaskEndScheduler(). */ * nothing to return to. */
}
} }
else else
{ {