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
|
* Copyright (c) 1988-1997 Sam Leffler
|
||||||
@ -77,7 +77,6 @@ TIFFReadDirectory(TIFF* tif)
|
|||||||
TIFFDirEntry* dir;
|
TIFFDirEntry* dir;
|
||||||
uint16 iv;
|
uint16 iv;
|
||||||
uint32 v;
|
uint32 v;
|
||||||
double dv;
|
|
||||||
const TIFFFieldInfo* fip;
|
const TIFFFieldInfo* fip;
|
||||||
int fix;
|
int fix;
|
||||||
uint16 dircount;
|
uint16 dircount;
|
||||||
@ -445,9 +444,12 @@ TIFFReadDirectory(TIFF* tif)
|
|||||||
break;
|
break;
|
||||||
case TIFFTAG_SMINSAMPLEVALUE:
|
case TIFFTAG_SMINSAMPLEVALUE:
|
||||||
case TIFFTAG_SMAXSAMPLEVALUE:
|
case TIFFTAG_SMAXSAMPLEVALUE:
|
||||||
if (!TIFFFetchPerSampleAnys(tif, dp, &dv) ||
|
{
|
||||||
!TIFFSetField(tif, dp->tdir_tag, dv))
|
double dv = 0.0;
|
||||||
goto bad;
|
if (!TIFFFetchPerSampleAnys(tif, dp, &dv) ||
|
||||||
|
!TIFFSetField(tif, dp->tdir_tag, dv))
|
||||||
|
goto bad;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case TIFFTAG_STRIPOFFSETS:
|
case TIFFTAG_STRIPOFFSETS:
|
||||||
case TIFFTAG_TILEOFFSETS:
|
case TIFFTAG_TILEOFFSETS:
|
||||||
@ -1369,9 +1371,8 @@ TIFFFetchPerSampleLongs(TIFF* tif, TIFFDirEntry* dir, uint32* pl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fetch samples/pixel ANY values for
|
* Fetch samples/pixel ANY values for the specified tag and verify that all
|
||||||
* the specified tag and verify that
|
* values are the same.
|
||||||
* all values are the same.
|
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
|
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
|
* Project: libtiff tools
|
||||||
* Purpose: Convert raw byte sequences in TIFF images
|
* 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;
|
*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;
|
return 1;
|
||||||
} else if (*width == 0 && *length != 0) {
|
} else if (*width == 0 && *length != 0) {
|
||||||
@ -379,7 +380,8 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
|
|||||||
|
|
||||||
*width = imagesize / *length;
|
*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;
|
return 1;
|
||||||
} else if (*width == 0 && *length == 0) {
|
} else if (*width == 0 && *length == 0) {
|
||||||
@ -415,7 +417,7 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
|
|||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Width is guessed as %lu, height is guessed as %lu.\n",
|
"Width is guessed as %lu, height is guessed as %lu.\n",
|
||||||
*width, *length);
|
(unsigned long)*width, (unsigned long)*length);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user