Skip to content

package.cpp: fix ILP32 build with -Wformat. #3527

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

enh-google
Copy link

Android uses -Wformat, and although %lu works on LP64 where size_t is unsigned long, on ILP32 where size_t is unsigned int it fails with "format specifies type 'unsigned long' but the argument has type 'unsigned int'".

The fix is to just use %zu, which is the specifier for size_t.

Android uses -Wformat, and although %lu works on LP64 where size_t is unsigned long, on ILP32 where size_t is unsigned int it fails with "format specifies type 'unsigned long' but the argument has type 'unsigned int'".

The fix is to just use %zu, which is the specifier for size_t.
@CLAassistant
Copy link

CLAassistant commented Jun 18, 2025

CLA assistant check
All committers have signed the CLA.

@richgillam richgillam self-assigned this Jun 26, 2025
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.

3 participants