diff options
Diffstat (limited to 'converter/other/pnmtojpeg.c')
-rw-r--r-- | converter/other/pnmtojpeg.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/converter/other/pnmtojpeg.c b/converter/other/pnmtojpeg.c index b33b36b3..7e7272a0 100644 --- a/converter/other/pnmtojpeg.c +++ b/converter/other/pnmtojpeg.c @@ -271,7 +271,7 @@ parseCommandLine(const int argc, char ** argv, cmdlineP->comment = NULL; cmdlineP->exif_filespec = NULL; - /* Make private copy of arguments for optParseOptions to corrupt */ + /* Make private copy of arguments for pm_optParseOptions to corrupt */ argc_parse = argc; for (i=0; i < argc+1; i++) argv_parse[i] = argv[i]; @@ -279,7 +279,7 @@ parseCommandLine(const int argc, char ** argv, opt.short_allowed = FALSE; /* We have no short (old-fashioned) options */ opt.allowNegNum = FALSE; /* We have no parms that are negative numbers */ - optParseOptions3(&argc_parse, argv_parse, opt, sizeof(opt), 0); + pm_optParseOptions3(&argc_parse, argv_parse, opt, sizeof(opt), 0); if (!qualitySpec) cmdlineP->quality = -1; /* unspecified */ @@ -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); |