Avoid warnings.
This commit is contained in:
parent
00ac9cab12
commit
aa3a68ca4d
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_dirread.c,v 1.58 2005-08-12 15:23:10 fwarmerdam Exp $ */
|
||||
/* $Id: tif_dirread.c,v 1.59 2005-09-13 13:17:57 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -77,7 +77,6 @@ TIFFReadDirectory(TIFF* tif)
|
||||
TIFFDirEntry* dir;
|
||||
uint16 iv;
|
||||
uint32 v;
|
||||
double dv;
|
||||
const TIFFFieldInfo* fip;
|
||||
int fix;
|
||||
uint16 dircount;
|
||||
@ -445,9 +444,12 @@ TIFFReadDirectory(TIFF* tif)
|
||||
break;
|
||||
case TIFFTAG_SMINSAMPLEVALUE:
|
||||
case TIFFTAG_SMAXSAMPLEVALUE:
|
||||
if (!TIFFFetchPerSampleAnys(tif, dp, &dv) ||
|
||||
!TIFFSetField(tif, dp->tdir_tag, dv))
|
||||
goto bad;
|
||||
{
|
||||
double dv = 0.0;
|
||||
if (!TIFFFetchPerSampleAnys(tif, dp, &dv) ||
|
||||
!TIFFSetField(tif, dp->tdir_tag, dv))
|
||||
goto bad;
|
||||
}
|
||||
break;
|
||||
case TIFFTAG_STRIPOFFSETS:
|
||||
case TIFFTAG_TILEOFFSETS:
|
||||
@ -1369,9 +1371,8 @@ TIFFFetchPerSampleLongs(TIFF* tif, TIFFDirEntry* dir, uint32* pl)
|
||||
}
|
||||
|
||||
/*
|
||||
* Fetch samples/pixel ANY values for
|
||||
* the specified tag and verify that
|
||||
* all values are the same.
|
||||
* Fetch samples/pixel ANY values for the specified tag and verify that all
|
||||
* values are the same.
|
||||
*/
|
||||
static int
|
||||
TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: raw2tiff.c,v 1.17 2004-11-28 14:44:31 dron Exp $
|
||||
/* $Id: raw2tiff.c,v 1.18 2005-09-13 13:21:43 dron Exp $
|
||||
*
|
||||
* Project: libtiff tools
|
||||
* Purpose: Convert raw byte sequences in TIFF images
|
||||
@ -371,7 +371,8 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
|
||||
|
||||
*length = imagesize / *width;
|
||||
|
||||
fprintf(stderr, "Height is guessed as %lu.\n", *length);
|
||||
fprintf(stderr, "Height is guessed as %lu.\n",
|
||||
(unsigned long)*length);
|
||||
|
||||
return 1;
|
||||
} else if (*width == 0 && *length != 0) {
|
||||
@ -379,7 +380,8 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
|
||||
|
||||
*width = imagesize / *length;
|
||||
|
||||
fprintf(stderr, "Width is guessed as %lu.\n", *width);
|
||||
fprintf(stderr, "Width is guessed as %lu.\n",
|
||||
(unsigned long)*width);
|
||||
|
||||
return 1;
|
||||
} else if (*width == 0 && *length == 0) {
|
||||
@ -415,7 +417,7 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
|
||||
|
||||
fprintf(stderr,
|
||||
"Width is guessed as %lu, height is guessed as %lu.\n",
|
||||
*width, *length);
|
||||
(unsigned long)*width, (unsigned long)*length);
|
||||
|
||||
return 1;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user