From 4d41e31652412c73c84a58482ec8ffc7330a5884 Mon Sep 17 00:00:00 2001 From: Rahul Kar Date: Thu, 23 May 2024 20:25:30 +0000 Subject: [PATCH] Fix warning in unit tests and memory check tests --- source/MQTTFileDownloader_cbor.c | 6 +++--- test/unit-test/downloader_utest.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/MQTTFileDownloader_cbor.c b/source/MQTTFileDownloader_cbor.c index a916d8e..a7aba2f 100644 --- a/source/MQTTFileDownloader_cbor.c +++ b/source/MQTTFileDownloader_cbor.c @@ -114,7 +114,7 @@ bool CBOR_Decode_GetStreamResponseMessage( const uint8_t * messageBuffer, if( CborNoError == cborResult ) { - cborResult = cbor_value_get_int( &value, ( int32_t * ) fileId ); + cborResult = cbor_value_get_int( &value, ( int * ) fileId ); } /* Find the block ID. */ @@ -132,7 +132,7 @@ bool CBOR_Decode_GetStreamResponseMessage( const uint8_t * messageBuffer, if( CborNoError == cborResult ) { - cborResult = cbor_value_get_int( &value, ( int32_t * ) blockId ); + cborResult = cbor_value_get_int( &value, ( int * ) blockId ); } /* Find the block size. */ @@ -150,7 +150,7 @@ bool CBOR_Decode_GetStreamResponseMessage( const uint8_t * messageBuffer, if( CborNoError == cborResult ) { - cborResult = cbor_value_get_int( &value, ( int32_t * ) blockSize ); + cborResult = cbor_value_get_int( &value, ( int * ) blockSize ); } /* Find the payload bytes. */ diff --git a/test/unit-test/downloader_utest.c b/test/unit-test/downloader_utest.c index 2d257d9..0841f65 100644 --- a/test/unit-test/downloader_utest.c +++ b/test/unit-test/downloader_utest.c @@ -626,9 +626,9 @@ void test_processReceivedDataBlock_processesCBORBlock( void ) int32_t fileId = 0; int32_t blockId = 0; int32_t blockSize = 0; - const int32_t expectedFileId = 20; - const int32_t expectedBlockId = 30; - const int32_t expectedBlockSize = 40; + int32_t expectedFileId = 20; + int32_t expectedBlockId = 30; + int32_t expectedBlockSize = 40; CBOR_Decode_GetStreamResponseMessage_ExpectAndReturn( ( const uint8_t * ) validCBORMsg, strlen( validCBORMsg ), NULL, NULL, NULL, NULL, NULL, true ); CBOR_Decode_GetStreamResponseMessage_IgnoreArg_fileId();