From 85d2cba801156e507c586621b67d132c6237fec3 Mon Sep 17 00:00:00 2001 From: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com> Date: Wed, 2 Aug 2023 14:42:45 +0530 Subject: [PATCH] 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 --- .github/workflows/kernel-demos.yml | 5 +++++ tasks.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/kernel-demos.yml b/.github/workflows/kernel-demos.yml index 865f4eefb..79ed8ca02 100644 --- a/.github/workflows/kernel-demos.yml +++ b/.github/workflows/kernel-demos.yml @@ -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 diff --git a/tasks.c b/tasks.c index f08215adf..c4e8bd424 100644 --- a/tasks.c +++ b/tasks.c @@ -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;