-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add some assertions and coverage exceptions to queue.c #273
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
Add some assertions and coverage exceptions to queue.c #273
Conversation
… ) == sizeof( Queue_t )
2b07d2d
to
8fe0864
Compare
( void ) xSize; /* Keeps lint quiet when configASSERT() is not defined. */ | ||
|
||
/* This assertion cannot be branch covered in unit tests */ | ||
configASSERT( xSize == sizeof( Queue_t ) ); /* LCOV_EXCL_BR_LINE */ |
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.
This is really a job for _Static_assert (C11).
…ntainer with a condition that is unreachable.
…eue Registry related functions. Add a configASSERT when a queue is added to a QueueRegistry that is already full.
8fe0864
to
676ce01
Compare
@@ -2723,6 +2727,9 @@ BaseType_t xQueueIsQueueFullFromISR( const QueueHandle_t xQueue ) | |||
{ | |||
UBaseType_t ux; | |||
|
|||
configASSERT( xQueue ); |
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.
This change will result in users with configASSERT enabled not being able to add a NULL queue handle to the queue registry.
…ell/FreeRTOS-Kernel into pbartell/fixup-queue-assertions
* main: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
* feature/xcore: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
* main: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
* feature/xcore: Add some assertions and coverage exceptions to queue.c (FreeRTOS#273) Moved git-secrets check to a different workflow (FreeRTOS#271) Comment: fix code comment for xTaskAbortDelay (FreeRTOS#272) Added git-secrets check to Github Actions (FreeRTOS#270) fixed documentation for ulTaskNotifyTake() and ulTaskNotifyTakeIndexed() (FreeRTOS#269) Add description for vTaskList (FreeRTOS#206) Support allocating stack from separate heap (FreeRTOS#267) Update python version to 3.7.10 (FreeRTOS#265) Update URL in history.txt (FreeRTOS#259) Remove unmatched braces in MessageBuffer pre tags (FreeRTOS#256) Check: improve verbosity of url verifier (FreeRTOS#260) Update issue templates incorporate updates from common (FreeRTOS#255) Typos (FreeRTOS#248) Delete gitattributes (FreeRTOS#253) Fix typo in comment in task.h (FreeRTOS#244) Fix Github checks after move from master to main (FreeRTOS#246)
Add some assertions and coverage exceptions to queue.c
Description
Test Steps
Only assertions and comments have been changed. This should be verified by inspection.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.