Use PRIu32 format specifier when printing time_in_secs#76
Merged
Conversation
Member
|
PRIu32, while being C99 compliant, implies 32-bits. Since I don't have any 16-bit systems to test against, I think the worst-case is a warning as the compiler converts. Other than pedantry, there's no impact to the core benchmark timing so this is fine. |
|
I took the time to rebuild llvm-mos's copy of coremark without this patch, and we got two warnings. Accordingly, I think there's another place to fix this at line 367. |
|
I also manually applied this patch along with a similar |
Contributor
Author
|
Thanks. I will update that this weekend :) |
Contributor
Author
|
Changes merged into development branch (dev_2026q3). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch addresses #35, where a printf statement for time_in_secs() (ee_u32) used the %d format specifier for int. The issue arise when using a 16-bit architecture where %d (int) does not match the size of ee_u32.
2 files are modified:
The change does not affect CoreMark result as it only impact the code for execution time reporting (after the workload is completed).