Skip to content

Commit

Permalink
add typecast for Logging (#268)
Browse files Browse the repository at this point in the history
<!--- Title -->

Description
-----------
<!--- Describe your changes in detail. -->
Typecast outgoing and incomingpublish count to unsigned longs to match
format specifier.
Test Steps
-----------
<!-- Describe the steps to reproduce. -->
core OTA demo had a build error due to format specifier used when
logging with coreMQTT. Adding these typecasts fixes the build error.
Checklist:
----------
<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
- [X] I have tested my changes. No regression in existing tests.
- [ ] I have modified and/or added unit-tests to cover the code changes
in this Pull Request.

Related Issue
-----------
<!-- If any, please provide issue ID. -->
By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
  • Loading branch information
bradleysmith23 authored Nov 21, 2023
1 parent 87bb497 commit ac5b9e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions source/core_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,7 @@ MQTTStatus_t MQTT_InitStatefulQoS( MQTTContext_t * pContext,
LogError( ( "Arguments do not match: pOutgoingPublishRecords=%p, "
"outgoingPublishCount=%lu",
( void * ) pOutgoingPublishRecords,
outgoingPublishCount ) );
( unsigned long ) outgoingPublishCount ) );
status = MQTTBadParameter;
}

Expand All @@ -2624,7 +2624,7 @@ MQTTStatus_t MQTT_InitStatefulQoS( MQTTContext_t * pContext,
LogError( ( "Arguments do not match: pIncomingPublishRecords=%p, "
"incomingPublishCount=%lu",
( void * ) pIncomingPublishRecords,
incomingPublishCount ) );
( unsigned long ) incomingPublishCount ) );
status = MQTTBadParameter;
}
else if( pContext->appCallback == NULL )
Expand Down

0 comments on commit ac5b9e4

Please sign in to comment.