-
Notifications
You must be signed in to change notification settings - Fork 9.6k
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
Format specifier warning in pdfrenderer.cpp #20
Comments
it seems that the z prefix isn't defined in MS Visual Studio size specification. |
I'm the author of this code. I'd prefer to keep using size_t for this number since PDF files can be really big (although, this code will break for other reasons once we get larger than 10 gigabytes). Not sure what to do here to make all platforms happy. http://stackoverflow.com/questions/2524611/how-to-print-size-t-variable-portably |
OK--since this warning isn't indicative of a larger problem, and there's no clear solution for muting this warning across the board, let's close this issue. |
That's not a solution. It's a bug, not a compiler warning which must be muted. You will get a wrong results on little endian platforms when sizeof(long) != sizeof(size_t). Adding a type cast would help: (long)len Even better would be replacing "%ld" by "%lu" and using this: (unsigned long)len |
I get a format specifier warning when building for Android using clang and tess-two:
I think it should be
%zd
or%zu
instead of%ld
, but I'm not sure if that works on Visual Studio too.The text was updated successfully, but these errors were encountered: