Skip to content

Commit 27c8ba9

Browse files
Merge pull request #25 from kar-rahul-aws/update_unit_tests
Fix warning in unit tests and memory check tests
2 parents fd434d0 + 22e619c commit 27c8ba9

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

source/MQTTFileDownloader_cbor.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ bool CBOR_Decode_GetStreamResponseMessage( const uint8_t * messageBuffer,
114114

115115
if( CborNoError == cborResult )
116116
{
117-
cborResult = cbor_value_get_int( &value, ( int32_t * ) fileId );
117+
cborResult = cbor_value_get_int( &value, ( int * ) fileId );
118118
}
119119

120120
/* Find the block ID. */
@@ -132,7 +132,7 @@ bool CBOR_Decode_GetStreamResponseMessage( const uint8_t * messageBuffer,
132132

133133
if( CborNoError == cborResult )
134134
{
135-
cborResult = cbor_value_get_int( &value, ( int32_t * ) blockId );
135+
cborResult = cbor_value_get_int( &value, ( int * ) blockId );
136136
}
137137

138138
/* Find the block size. */
@@ -150,7 +150,7 @@ bool CBOR_Decode_GetStreamResponseMessage( const uint8_t * messageBuffer,
150150

151151
if( CborNoError == cborResult )
152152
{
153-
cborResult = cbor_value_get_int( &value, ( int32_t * ) blockSize );
153+
cborResult = cbor_value_get_int( &value, ( int * ) blockSize );
154154
}
155155

156156
/* Find the payload bytes. */

test/unit-test/downloader_utest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -626,9 +626,9 @@ void test_processReceivedDataBlock_processesCBORBlock( void )
626626
int32_t fileId = 0;
627627
int32_t blockId = 0;
628628
int32_t blockSize = 0;
629-
const int32_t expectedFileId = 20;
630-
const int32_t expectedBlockId = 30;
631-
const int32_t expectedBlockSize = 40;
629+
int32_t expectedFileId = 20;
630+
int32_t expectedBlockId = 30;
631+
int32_t expectedBlockSize = 40;
632632

633633
CBOR_Decode_GetStreamResponseMessage_ExpectAndReturn( ( const uint8_t * ) validCBORMsg, strlen( validCBORMsg ), NULL, NULL, NULL, NULL, NULL, true );
634634
CBOR_Decode_GetStreamResponseMessage_IgnoreArg_fileId();

0 commit comments

Comments
 (0)