@@ -170,8 +170,8 @@ MQTTFileDownloaderStatus_t mqttDownloader_init( MqttFileDownloaderContext_t * co
170
170
const char * getStreamApiSuffix = NULL ;
171
171
MQTTFileDownloaderStatus_t initStatus = MQTTFileDownloaderSuccess ;
172
172
173
- if ( ( streamName == NULL ) || ( streamNameLength == 0 ) ||
174
- ( thingName == NULL ) || ( thingNameLength == 0 ) || ( context == NULL ) )
173
+ if ( ( streamName == NULL ) || ( streamNameLength == 0U ) ||
174
+ ( thingName == NULL ) || ( thingNameLength == 0U ) || ( context == NULL ) )
175
175
{
176
176
initStatus = MQTTFileDownloaderBadParameter ;
177
177
}
@@ -183,9 +183,9 @@ MQTTFileDownloaderStatus_t mqttDownloader_init( MqttFileDownloaderContext_t * co
183
183
( void ) memset ( context -> topicGetStream , ( int32_t ) '\0' , TOPIC_GET_STREAM_BUFFER_SIZE );
184
184
context -> topicStreamDataLength = 0U ;
185
185
context -> topicGetStreamLength = 0U ;
186
- context -> dataType = dataType ;
186
+ context -> dataType = ( uint8_t ) dataType ;
187
187
188
- if ( dataType == DATA_TYPE_JSON )
188
+ if ( context -> dataType == ( uint8_t ) DATA_TYPE_JSON )
189
189
{
190
190
streamDataApiSuffix = MQTT_API_DATA_JSON ;
191
191
}
@@ -379,7 +379,7 @@ MQTTFileDownloaderStatus_t mqttDownloader_isDataBlockReceived( const MqttFileDow
379
379
{
380
380
MQTTFileDownloaderStatus_t status = MQTTFileDownloaderFailure ;
381
381
382
- if ( ( topic == NULL ) || ( topicLength == 0 ) )
382
+ if ( ( topic == NULL ) || ( topicLength == 0U ) )
383
383
{
384
384
status = MQTTFileDownloaderBadParameter ;
385
385
}
@@ -404,11 +404,11 @@ MQTTFileDownloaderStatus_t mqttDownloader_processReceivedDataBlock( const MqttFi
404
404
{
405
405
MQTTFileDownloaderStatus_t decodingStatus = MQTTFileDownloaderFailure ;
406
406
407
- if ( ( message != NULL ) && ( messageLength != 0 ) && ( data != NULL ) && ( dataLength != NULL ) )
407
+ if ( ( message != NULL ) && ( messageLength != 0U ) && ( data != NULL ) && ( dataLength != NULL ) )
408
408
{
409
409
( void ) memset ( data , ( int32_t ) '\0' , mqttFileDownloader_CONFIG_BLOCK_SIZE );
410
410
411
- if ( context -> dataType == DATA_TYPE_JSON )
411
+ if ( context -> dataType == ( uint8_t ) DATA_TYPE_JSON )
412
412
{
413
413
decodingStatus = handleJsonMessage ( data ,
414
414
dataLength ,
0 commit comments