From ac5b9e4dcd7aefc7a71e72f1387aae15bebdd0a2 Mon Sep 17 00:00:00 2001 From: bradleysmith23 <74752142+bradleysmith23@users.noreply.github.com> Date: Tue, 21 Nov 2023 14:55:30 -0800 Subject: [PATCH] add typecast for Logging (#268) Description ----------- Typecast outgoing and incomingpublish count to unsigned longs to match format specifier. Test Steps ----------- core OTA demo had a build error due to format specifier used when logging with coreMQTT. Adding these typecasts fixes the build error. Checklist: ---------- - [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 ----------- By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --- source/core_mqtt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/core_mqtt.c b/source/core_mqtt.c index 738572eaf..8b72c5d17 100644 --- a/source/core_mqtt.c +++ b/source/core_mqtt.c @@ -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; } @@ -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 )