diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-04-10 16:07:24 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-04-10 16:07:24 +0000 |
commit | 7d714381d1af9f51ae0094df79e1fe8d28c46b84 (patch) | |
tree | cf576cb526aa84b025b3bb599062e1849a55a3b0 /converter/other/pnmtojpeg.c | |
parent | 73225706f044df73549d0982e782b41ff94e117f (diff) | |
download | netpbm-mirror-7d714381d1af9f51ae0094df79e1fe8d28c46b84.tar.gz netpbm-mirror-7d714381d1af9f51ae0094df79e1fe8d28c46b84.tar.xz netpbm-mirror-7d714381d1af9f51ae0094df79e1fe8d28c46b84.zip |
Fix compiler warnings
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1185 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/other/pnmtojpeg.c')
-rw-r--r-- | converter/other/pnmtojpeg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/converter/other/pnmtojpeg.c b/converter/other/pnmtojpeg.c index 198aa156..ef1df617 100644 --- a/converter/other/pnmtojpeg.c +++ b/converter/other/pnmtojpeg.c @@ -898,7 +898,7 @@ write_exif_header(struct jpeg_compress_struct * const cinfoP, pm_error("Invalid length %u at start of exif file", length); else { unsigned char * exif_data; - int rc; + size_t rc; size_t const data_length = length - 2; /* Subtract 2 byte length field*/ @@ -906,14 +906,15 @@ write_exif_header(struct jpeg_compress_struct * const cinfoP, exif_data = malloc(data_length); if (exif_data == NULL) - pm_error("Unable to allocate %d bytes for exif header buffer", - data_length); + pm_error("Unable to allocate %u bytes for exif header buffer", + (unsigned)data_length); rc = fread(exif_data, 1, data_length, exif_file); if (rc != data_length) pm_error("Premature end of file on exif header file. Should be " - "%d bytes of data, read only %d", data_length, rc); + "%u bytes of data, read only %u", + (unsigned)data_length, (unsigned)rc); jpeg_write_marker(cinfoP, JPEG_APP0+1, (const JOCTET *) exif_data, data_length); |