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

Use long int format specifiers #2077

Closed
wants to merge 1 commit into from

Conversation

hd1ex
Copy link

@hd1ex hd1ex commented Jun 19, 2024

Long integers should be prefixed with l in format strings.

My compiler won't let me compile without fixing this.

Long integers should be prefixed with l in format strings.
@hd1ex hd1ex force-pushed the long-int-format-specifiers branch from 61a0873 to 498ec8e Compare June 19, 2024 16:39
@tbnobody
Copy link
Owner

If I apply your PR I get the following warnings:

src/NetworkSettings.cpp: In member function 'void NetworkSettingsClass::loop()':
src/NetworkSettings.cpp:210:38: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'uint32_t' {aka 'unsigned int'} [-Wformat=]
                 MessageOutput.printf("Admin AP remaining seconds: %ld / %ld\r\n", _adminTimeoutCounter, _adminTimeoutCounterMax);
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~~~~~
src/NetworkSettings.cpp:210:38: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'uint32_t' {aka 'unsigned int'} [-Wformat=]

What toolchain version are you using?

@hd1ex
Copy link
Author

hd1ex commented Jun 19, 2024

Ok, seems like these types only change with the newer Arduino-ESP version. I will include these in my change for supporting arduino-esp-v3 and reorder them. Sorry for the noise!

@hd1ex hd1ex closed this Jun 19, 2024
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

2 participants