From 6be58fbab2e4130d4e21bfd97ac732200e6c8b7b Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Thu, 9 Sep 2004 18:06:14 +0000 Subject: [PATCH] avoid warnings --- ChangeLog | 5 +++++ tools/tiff2ps.c | 6 +++++- tools/tiffmedian.c | 10 ++++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1bf3c5de..8bea15ad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-09-09 Frank Warmerdam + + * tools/tiff2ps.c, tools/tiffmedian.c: fiddle with include files + to avoid compile warnings about getopt() and a few other things. + 2004-09-02 Andrey Kiselev * libtiff/tif_dirread.c: Use memcpy() function instead of pointer diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c index ed5508bf..c4a173ab 100644 --- a/tools/tiff2ps.c +++ b/tools/tiff2ps.c @@ -1,4 +1,4 @@ -/* $Id: tiff2ps.c,v 1.26 2004-08-25 18:34:55 dron Exp $ */ +/* $Id: tiff2ps.c,v 1.27 2004-09-09 18:06:14 fwarmerdam Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -32,6 +32,10 @@ #include #include +#ifdef HAVE_UNISTD_H +# include +#endif + #include "tiffio.h" /* diff --git a/tools/tiffmedian.c b/tools/tiffmedian.c index 8b4f958d..80266406 100644 --- a/tools/tiffmedian.c +++ b/tools/tiffmedian.c @@ -1,4 +1,4 @@ -/* $Id: tiffmedian.c,v 1.7 2004-07-24 19:03:16 dron Exp $ */ +/* $Id: tiffmedian.c,v 1.8 2004-09-09 18:06:14 fwarmerdam Exp $ */ /* * Apply median cut on an image. @@ -40,10 +40,16 @@ * Siggraph '82 proceedings, pp. 297-307 */ +#include "tif_config.h" + #include #include #include +#ifdef HAVE_UNISTD_H +# include +#endif + #include "tiffio.h" #define MAX_CMAP_SIZE 256 @@ -401,7 +407,7 @@ static void splitbox(Colorbox* ptr) { uint32 hist2[B_LEN]; - int first, last; + int first=0, last=0; register Colorbox *new; register uint32 *iptr, *histp; register int i, j;