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>
This commit is contained in:
Gaurav-Aggarwal-AWS 2023-08-02 14:42:45 +05:30 committed by GitHub
parent b51a37314c
commit 85d2cba801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -85,6 +85,11 @@ jobs:
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

View file

@ -5546,7 +5546,7 @@ static void prvCheckTasksWaitingTermination( void )
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;