Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect size compiler warning #116

Merged
merged 3 commits into from
Dec 2, 2020

Conversation

muneebahmed10
Copy link
Contributor

Description:
Compiling core_mqtt_serializer.c gives the following warning:

/Users/ahmemune/Documents/EmbeddedCSDK/libraries/standard/coreMQTT/source/core_mqtt_serializer.c:2218:25: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
                        MQTT_PACKET_PINGREQ_SIZE ) );
                        ^~~~~~~~~~~~~~~~~~~~~~~~
/Users/ahmemune/Documents/EmbeddedCSDK/libraries/standard/coreMQTT/source/core_mqtt_serializer.c:68:53: note: expanded from macro 'MQTT_PACKET_PINGREQ_SIZE'
#define MQTT_PACKET_PINGREQ_SIZE                    ( 2U )

I updated the definition to an unsigned long, matching MQTT_DISCONNECT_PACKET_SIZE

@muneebahmed10 muneebahmed10 merged commit ca492a4 into FreeRTOS:main Dec 2, 2020
@muneebahmed10 muneebahmed10 deleted the fix-macro-specifier branch December 2, 2020 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants