Skip to content

-Wsign-compare compiler warnings #493

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

Closed
zfields opened this issue Jul 18, 2024 · 0 comments · Fixed by #497
Closed

-Wsign-compare compiler warnings #493

zfields opened this issue Jul 18, 2024 · 0 comments · Fixed by #497
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@zfields
Copy link
Contributor

zfields commented Jul 18, 2024

Running this Arduino CLI command from the folder of a sketch that #includes the "ArduinoIoTCloud" library:

arduino-cli compile --verbose --warnings=all --build-property "build.extra_flags=-Wno-unused-variable -Wno-implicit-fallthrough -Wno-psabi -Wno-deprecated-copy -Wno-missing-field-initializers -Wno-vla -Wno-delete-non-virtual-dtor -Og -g" --fqbn arduino:mbed_opta:opta

results in this compiler warning:

~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp: In member function 'void OTADefaultCloudProcessInterface::parseOta(uint8_t*, size_t)':
~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp:205:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if(context->downloadedSize == http_client->contentLength()) {
          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/Development/Arduino/libraries/ArduinoIoTCloud/src/ota/interface/OTAInterfaceDefault.cpp:209:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if(context->downloadedSize > http_client->contentLength()) {
          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@zfields zfields changed the title signed / unsigned comparison compiler warnings -Wsign-compare compiler warnings Jul 18, 2024
@arduino-libraries arduino-libraries deleted a comment from zfields Jul 19, 2024
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Jul 19, 2024
@per1234 per1234 added the conclusion: resolved Issue was resolved label Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants