Skip to content

Add WUT_FORMAT_PRINTF and fix some format string bugs. #404

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

Merged
merged 1 commit into from
May 17, 2025

Conversation

dkosmari
Copy link
Contributor

@dkosmari dkosmari commented Oct 8, 2024

This adds WUT_FORMAT_PRINTF to decorate printf-like functions.

Incidentally, this revealed a few debug prints that had the wrong number of arguments for the format string, or read the wrong number of bytes from an argument (in devoptab_fsa_truncate.cpp, that one was pretty bad.)

Debug prints were also changed to use %p for pointers. I don't think any of those cases could lead to crashes though.

…ike functions.

- Fixed a few format string bugs, in `libwhb/crash.c` and `wutdevoptab`, where there was a
  mismatch of specifiers and arguments that could lead to crashes.

- Made debug prints use `%p` when printing pointers.

--HG--
branch : printf-attribute-hg
@GaryOderNichts GaryOderNichts merged commit 81db8e5 into devkitPro:master May 17, 2025
1 check passed
@dkosmari dkosmari deleted the printf-attribute branch May 19, 2025 00:00
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