mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 12:35:28 +00:00
fix(system): fixed warnings related to ununsed var if asserts disabled
This commit is contained in:
@@ -455,6 +455,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
||||
* message buffer structure. */
|
||||
volatile size_t xSize = sizeof( StaticStreamBuffer_t );
|
||||
configASSERT( xSize == sizeof( StreamBuffer_t ) );
|
||||
( void ) xSize; /* Prevent unused variable warning when configASSERT() is not used. */
|
||||
} /*lint !e529 xSize is referenced is configASSERT() is defined. */
|
||||
#endif /* configASSERT_DEFINED */
|
||||
|
||||
@@ -1420,6 +1421,7 @@ static void prvInitialiseNewStreamBuffer( StreamBuffer_t * const pxStreamBuffer,
|
||||
* result in confusion as to what is actually being observed. */
|
||||
const BaseType_t xWriteValue = 0x55;
|
||||
configASSERT( memset( pucBuffer, ( int ) xWriteValue, xBufferSizeBytes ) == pucBuffer );
|
||||
(void)xWriteValue;
|
||||
} /*lint !e529 !e438 xWriteValue is only used if configASSERT() is defined. */
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user