We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Brad Smith 2011-10-26 19:19:37 EDT
Created an attachment (id=41) [details] png2bl printf patch
Fix format specifier for a printf in png2dbl. The type used within struct pngdata for width and height are 32-bit types not 64-bit.
The text was updated successfully, but these errors were encountered:
strk@keybit.net 2011-10-27 03:01:11 EDT
Here .width and .height are png_uint_32, which is:
/usr/include/pngconf.h:typedef unsigned long png_uint_32;
This test, run with -Wall on both 32bit and 64bit machines shows there should be no warning in those lines:
---8<----------------------
#include <stdio.h>
int main() { long int a = 1; int b = 2; unsigned long int c = 3;
printf("%d\n", a); // warning here printf("%ld\n", a); printf("%d\n", b); printf("%ld\n", b); // warning here printf("%d\n", c); // warning here printf("%ld\n", c);
}
---8<-----------------------
Do you get the same warnings as reported with the above test ? Does your png header define .width and .height in some other way ?
Sorry, something went wrong.
--- util/png2dbl.c.orig Tue Jul 5 23:38:54 2011 +++ util/png2dbl.c Tue Jul 5 23:40:30 2011 @@ -108,7 +108,7 @@ struct pngdata readPNG(FILE *fp)
if(verbose) {
No branches or pull requests
Brad Smith 2011-10-26 19:19:37 EDT
Created an attachment (id=41) [details]
png2bl printf patch
Fix format specifier for a printf in png2dbl. The type used within struct
pngdata for width and height are 32-bit types not 64-bit.
The text was updated successfully, but these errors were encountered: