Skip to content

Fix warnings: Format string#15018

Open
RaceTheMaSe wants to merge 14 commits intolibsdl-org:mainfrom
RaceTheMaSe:format-string
Open

Fix warnings: Format string#15018
RaceTheMaSe wants to merge 14 commits intolibsdl-org:mainfrom
RaceTheMaSe:format-string

Conversation

@RaceTheMaSe
Copy link
Contributor

@RaceTheMaSe RaceTheMaSe commented Feb 9, 2026

Align and correct printf(-family) format string usage:

  • Adjust specifier to the actual type if possible
  • Type cast argument to expected type

My assumption is version numbers are always unsigned. If this does not hold, this commit needs to be reverted.

I left out all the occurances where enum types are involved. They are in a follow up branch. The key doubt is about them being implementation-defined. GCC and Clang both choose uint types where possible, but can't say if this is true in all versions and standards and how other compilers handle it. Let me know if this should be PR'd as well.

@sezero
Copy link
Contributor

sezero commented Feb 9, 2026

Didn't read the rest, but can you please lose the stupid (void*) casts from %p usages?
c.f.: #10933

@RaceTheMaSe
Copy link
Contributor Author

RaceTheMaSe commented Feb 9, 2026

Can't reproduce the build fails with emscripten. Set it up locally just to verify and debug but - as far as I can tell - the tests work. At least when run manually ... the automated setup with ctest doesn't work. But copied the launch commands and seeing the results in browser with all tests passing.

Whats strange is that different test cases fail.

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.

2 participants