Skip to content
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

Type conversion warnings #727

Open
sevstels opened this issue Oct 30, 2024 · 1 comment
Open

Type conversion warnings #727

sevstels opened this issue Oct 30, 2024 · 1 comment

Comments

@sevstels
Copy link

..\Nuklear\common\overview.c(430,33): warning C4477: 'sprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
..\Nuklear\common\overview.c(430,33): message : consider using '%zu' in the format string
..\Nuklear\common\overview.c(442,33): warning C4477: 'sprintf' : format string '%lu' requires an argument of type 'unsigned long', but variadic argument 1 has type 'size_t'
..\Nuklear\common\overview.c(442,33): message : consider using '%zu' in the format string

@Xeverous
Copy link
Contributor

Without looking deep into the code, if this is a bit-width issue these % formatters should be replaced with PRIxxx macros (or %zu for size_t). They are platform-independent (though they require stdlib - maybe even more build configuration needed).

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

No branches or pull requests

2 participants