Fix warning introduced in PR 730 (#735)
The change addresses the following warning:
```
tasks.c:5549:40: warning: assignment discards 'volatile' qualifier from
pointer target type [-Wdiscarded-qualifiers]
5549 | pxTaskStatus->pxTopOfStack = pxTCB->pxTopOfStack;
|
```
Also add the "Build Posix_GCC Demo for Coverage Test" in the PR checks
as coverage test target treats warnings as errors and therefore, will
catch such warnings in PR checks.
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
diff --git a/.github/workflows/kernel-demos.yml b/.github/workflows/kernel-demos.yml
index 865f4ee..79ed8ca 100644
--- a/.github/workflows/kernel-demos.yml
+++ b/.github/workflows/kernel-demos.yml
@@ -85,6 +85,11 @@
working-directory: FreeRTOS/Demo/Posix_GCC
run: make -j
+ - name: Build Posix_GCC Demo for Coverage Test
+ shell: bash
+ working-directory: FreeRTOS/Demo/Posix_GCC
+ run: make -j COVERAGE_TEST=1
+
MSP430-GCC:
name: GNU MSP430 Toolchain
runs-on: ubuntu-latest
diff --git a/tasks.c b/tasks.c
index f08215a..c4e8bd4 100644
--- a/tasks.c
+++ b/tasks.c
@@ -5546,7 +5546,7 @@
pxTaskStatus->uxCurrentPriority = pxTCB->uxPriority;
pxTaskStatus->pxStackBase = pxTCB->pxStack;
#if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
- pxTaskStatus->pxTopOfStack = pxTCB->pxTopOfStack;
+ pxTaskStatus->pxTopOfStack = ( StackType_t * ) pxTCB->pxTopOfStack;
pxTaskStatus->pxEndOfStack = pxTCB->pxEndOfStack;
#endif
pxTaskStatus->xTaskNumber = pxTCB->uxTCBNumber;