-
Notifications
You must be signed in to change notification settings - Fork 1.3k
tasks.c:2067:11: warning: this condition has identical branches [-Wduplicated-branches] #482
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tasks.c:2067:11: warning: this condition has identical branches [-Wduplicated-branches] #482
Conversation
…ing/error with option GCC -Wduplicated-branches
tasks.c
Outdated
/* if just above call of xPortStartScheduler not return pdFALSE | ||
* Should not reach here as if the scheduler is running the | ||
* function will not return. | ||
* otherwise | ||
* Should only reach here if a task calls xTaskEndScheduler(). */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* if just above call of xPortStartScheduler not return pdFALSE | |
* Should not reach here as if the scheduler is running the | |
* function will not return. | |
* otherwise | |
* Should only reach here if a task calls xTaskEndScheduler(). */ | |
/* In most cases, xPortStartScheduler() will not return. If it | |
* returns pdTRUE then there was not enough heap memory available | |
* to create either the Idle or the Timer task. If it returned | |
* pdFALSE, then the application called xTaskEndScheduler(). | |
* Most ports don't implement xTaskEndScheduler() as there is | |
* nothing to return to. */ | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Codecov Report
@@ Coverage Diff @@
## main #482 +/- ##
=======================================
Coverage 92.44% 92.44%
=======================================
Files 4 4
Lines 1270 1270
Branches 343 343
=======================================
Hits 1174 1174
Misses 50 50
Partials 46 46
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
…-branches * remotes/upstream/main: Add a guard around mpu_wrappers.c (FreeRTOS#480)
Sorry But it don't understand why formatting failed ? |
Please apply the following patch - formatting.zip |
* remotes/upstream/main: tasks.c:2067:11: warning: this condition has identical branches [-Wduplicated-branches] (FreeRTOS#482) Add a guard around mpu_wrappers.c (FreeRTOS#480)
Description
Replace duplicated if branch because empty by a comment to avoid warning/error with option GCC -Wduplicated-branches
Test Steps
Build file with -Wduplicated-branches and -Werror with GCC
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.