Skip to content

fix printf size arguments#79

Closed
Un1q32 wants to merge 1 commit into
p2r3:mainfrom
Un1q32:main
Closed

fix printf size arguments#79
Un1q32 wants to merge 1 commit into
p2r3:mainfrom
Un1q32:main

Conversation

@Un1q32

@Un1q32 Un1q32 commented Sep 14, 2025

Copy link
Copy Markdown
Contributor

the z size argument for printf specifies size_t sized numbers, this would previously produce warnings on some compilers and also might print the wrong value on 64 bit systems.

@p2r3

p2r3 commented Sep 15, 2025

Copy link
Copy Markdown
Owner

Conflicts with #81 (which I consider a fairly valuable proposal), and just generally not that big of an issue? I doubt it'd print wrong values given that the input is a file size for block/player data. It's not going to be exceeding 32 bits in normal use.

@p2r3 p2r3 closed this Sep 15, 2025
@Un1q32

Un1q32 commented Sep 15, 2025

Copy link
Copy Markdown
Contributor Author

maybe just do %lu and silence the warn then? long should always be the same width as size_t on 32 and 64 bit.

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