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 compilation warning when compiling with -Wformat flag #1740

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PBrunot
Copy link

@PBrunot PBrunot commented May 17, 2024

Compiler warning : format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t'

The compiler warning arises because the format specifier %lu expects a long unsigned int, but the variable free is of type uint32_t (which is typically unsigned int). The ESP32, part of the Espressif32 family, typically defines uint32_t as unsigned int, so using the %u format specifier is appropriate.

Compiler warning : format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint32_t'
he compiler warning arises because the format specifier %lu expects a long unsigned int, but the variable free is of type uint32_t (which is typically unsigned int). The ESP32, part of the Espressif32 family, typically defines uint32_t as unsigned int, so using the %u format specifier is appropriate.
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.

None yet

1 participant