From 77d8086f1c36f97e4254adb715c40ae6dbcc6164 Mon Sep 17 00:00:00 2001 From: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:44:23 +0800 Subject: [PATCH] Fix clang warning in croutine and stream buffer (#686) * Fix document warning in croutine * Fix cast-qual warning in stream buffer --- include/croutine.h | 10 +++++----- stream_buffer.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/croutine.h b/include/croutine.h index 8ac4aa521bc..96e39723080 100644 --- a/include/croutine.h +++ b/include/croutine.h @@ -53,11 +53,11 @@ typedef void (* crCOROUTINE_CODE)( CoRoutineHandle_t, typedef struct corCoRoutineControlBlock { crCOROUTINE_CODE pxCoRoutineFunction; - ListItem_t xGenericListItem; /*< List item used to place the CRCB in ready and blocked queues. */ - ListItem_t xEventListItem; /*< List item used to place the CRCB in event lists. */ - UBaseType_t uxPriority; /*< The priority of the co-routine in relation to other co-routines. */ - UBaseType_t uxIndex; /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */ - uint16_t uxState; /*< Used internally by the co-routine implementation. */ + ListItem_t xGenericListItem; /**< List item used to place the CRCB in ready and blocked queues. */ + ListItem_t xEventListItem; /**< List item used to place the CRCB in event lists. */ + UBaseType_t uxPriority; /**< The priority of the co-routine in relation to other co-routines. */ + UBaseType_t uxIndex; /**< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */ + uint16_t uxState; /**< Used internally by the co-routine implementation. */ } CRCB_t; /* Co-routine control block. Note must be identical in size down to uxPriority with TCB_t. */ /** diff --git a/stream_buffer.c b/stream_buffer.c index 77543065591..cbc0939b3cd 100644 --- a/stream_buffer.c +++ b/stream_buffer.c @@ -478,7 +478,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer, StaticStreamBuffer_t ** ppxStaticStreamBuffer ) { BaseType_t xReturn; - const StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; + StreamBuffer_t * const pxStreamBuffer = xStreamBuffer; configASSERT( pxStreamBuffer ); configASSERT( ppucStreamBufferStorageArea );