From 840cb0032fb28979b05e8b08607905197e2cd86c Mon Sep 17 00:00:00 2001 From: Bob Friesenhahn Date: Sun, 30 Aug 2009 17:38:51 +0000 Subject: [PATCH] * tools/{tiffcrop.c,tiffgt.c}: Applied patch from Oden Eriksson to fix build with gcc when using the "-Wformat -Werror=format-security" flags. --- ChangeLog | 6 ++++++ tools/tiffcrop.c | 6 +++--- tools/tiffgt.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f39845f6..92867dfa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-08-30 Bob Friesenhahn + + * tools/{tiffcrop.c,tiffgt.c}: Applied patch from Oden Eriksson to + fix build with gcc when using the "-Wformat + -Werror=format-security" flags. + 2009-08-29 Bob Friesenhahn * test/{bmp2tiff_palette.sh, bmp2tiff_rgb.sh, gif2tiff.sh, diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c index 6220fc15..63e687d9 100644 --- a/tools/tiffcrop.c +++ b/tools/tiffcrop.c @@ -1,4 +1,4 @@ -/* $Id: tiffcrop.c,v 1.12 2009-02-06 15:43:06 fwarmerdam Exp $ */ +/* $Id: tiffcrop.c,v 1.13 2009-08-30 17:38:51 bfriesen Exp $ */ /* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of * the image data through additional options listed below @@ -1981,7 +1981,7 @@ main(int argc, char* argv[]) (dump.format == DUMP_TEXT) ? "txt" : "raw"); if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL) { - TIFFError ("Unable to open dump file %s for writing", temp_filename); + TIFFError ("Unable to open dump file %s for writing", "%s", temp_filename); exit (-1); } dump_info(dump.infile, dump.format, "Reading image","%d from %s", @@ -1997,7 +1997,7 @@ main(int argc, char* argv[]) (dump.format == DUMP_TEXT) ? "txt" : "raw"); if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL) { - TIFFError ("Unable to open dump file %s for writing", temp_filename); + TIFFError ("Unable to open dump file %s for writing", "%s", temp_filename); exit (-1); } dump_info(dump.outfile, dump.format, "Writing image","%d from %s", diff --git a/tools/tiffgt.c b/tools/tiffgt.c index a62ed2db..ac5a03bb 100644 --- a/tools/tiffgt.c +++ b/tools/tiffgt.c @@ -1,4 +1,4 @@ -/* $Id: tiffgt.c,v 1.7 2006-03-23 14:54:02 dron Exp $ */ +/* $Id: tiffgt.c,v 1.8 2009-08-30 17:38:51 bfriesen Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -204,7 +204,7 @@ initImage(void) if (photo != (uint16) -1) TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photo); if (!TIFFRGBAImageBegin(&img, tif, stoponerr, title)) { - TIFFError(filelist[fileindex], title); + TIFFError(filelist[fileindex], "%s", title); TIFFClose(tif); tif = NULL; return -1;