From 7293a4165b5c5d8ba4f18134b2201e653e193cb8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 8 Dec 2017 03:27:29 +0100 Subject: [PATCH] Remove tests for undefined SIZEOF_VOIDP As configure never uses AC_CHECK_SIZEOF(void*), this symbol is never defined and so it doesn't make sense to test it in the code, this just results in -Wundef warnings if they're enabled. --- libtiff/tif_dirread.c | 4 ++-- libtiff/tif_read.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libtiff/tif_dirread.c b/libtiff/tif_dirread.c index de688a31..3fc0c8e0 100644 --- a/libtiff/tif_dirread.c +++ b/libtiff/tif_dirread.c @@ -774,7 +774,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8(TIFF* tif, TIFFDirEntry* di static enum TIFFReadDirEntryErr TIFFReadDirEntryDataAndRealloc( TIFF* tif, uint64 offset, tmsize_t size, void** pdest) { -#if SIZEOF_VOIDP == 8 || SIZEOF_SIZE_T == 8 +#if SIZEOF_SIZE_T == 8 tmsize_t threshold = INITIAL_THRESHOLD; #endif tmsize_t already_read = 0; @@ -795,7 +795,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryDataAndRealloc( void* new_dest; tmsize_t bytes_read; tmsize_t to_read = size - already_read; -#if SIZEOF_VOIDP == 8 || SIZEOF_SIZE_T == 8 +#if SIZEOF_SIZE_T == 8 if( to_read >= threshold && threshold < MAX_THRESHOLD ) { to_read = threshold; diff --git a/libtiff/tif_read.c b/libtiff/tif_read.c index 47ff7559..d1cfe469 100644 --- a/libtiff/tif_read.c +++ b/libtiff/tif_read.c @@ -56,7 +56,7 @@ static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, int is_strip, uint32 strip_or_tile, const char* module ) { -#if SIZEOF_VOIDP == 8 || SIZEOF_SIZE_T == 8 +#if SIZEOF_SIZE_T == 8 tmsize_t threshold = INITIAL_THRESHOLD; #endif tmsize_t already_read = 0; @@ -71,7 +71,7 @@ static int TIFFReadAndRealloc( TIFF* tif, tmsize_t size, { tmsize_t bytes_read; tmsize_t to_read = size - already_read; -#if SIZEOF_VOIDP == 8 || SIZEOF_SIZE_T == 8 +#if SIZEOF_SIZE_T == 8 if( to_read >= threshold && threshold < MAX_THRESHOLD && already_read + to_read + rawdata_offset > tif->tif_rawdatasize ) {