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

Compile error for comparison of integer expressions of different signedness #282

Closed
skyfishyubo opened this issue Apr 24, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@skyfishyubo
Copy link

../../../../lib/mqtt_client/coreMQTT/source/core_mqtt.c: In function 'sendConnectWithoutCopy':

../../../../lib/mqtt_client/coreMQTT/source/core_mqtt.c:2220:50: error: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare]

     assert( ( pIndex - connectPacketHeader ) <= sizeof( connectPacketHeader ) );
@moninom1
Copy link
Member

Hello @skyfishyubo ,
Thank you for bringing this to our attention! We will take a look at this issue. Thank you for your patience!

tony-josi-aws added a commit that referenced this issue Apr 25, 2024
<!--- Title -->

Description
-----------
This PR fixes a build issue when `Werror=sign-compare` is enabled while
building the library.

Test Steps
-----------
<!-- Describe the steps to reproduce. -->

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
-----------
#282 

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
@tony-josi-aws tony-josi-aws added the bug Something isn't working label Apr 25, 2024
@tony-josi-aws
Copy link
Member

@skyfishyubo
Closing this issue as #283 should fix this. Please feel free to reopen if you think otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants