SDL_image: IMG_tif.c: prepare for libtiff-4.3.0.

From dcbe0c67cee969e8683e78cc2c9f126f60810342 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Fri, 16 Apr 2021 23:11:24 +0300
Subject: [PATCH] IMG_tif.c: prepare for libtiff-4.3.0.

libtiff-4.3.0 deprecates the use of int8, uint8, int16, uint16, int32,
uint32, int64, uint64 typedefs. Our only use of them was 'uint32' with
TIFFReadRGBAImageOriented(): Just replace uint32 with SDL's own Uint32
and it compiles without any warnings.
---
 IMG_tif.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/IMG_tif.c b/IMG_tif.c
index 8056122..7abc3ae 100644
--- a/IMG_tif.c
+++ b/IMG_tif.c
@@ -37,7 +37,7 @@ static struct {
 	TIFF* (*TIFFClientOpen)(const char*, const char*, thandle_t, TIFFReadWriteProc, TIFFReadWriteProc, TIFFSeekProc, TIFFCloseProc, TIFFSizeProc, TIFFMapFileProc, TIFFUnmapFileProc);
 	void (*TIFFClose)(TIFF*);
 	int (*TIFFGetField)(TIFF*, ttag_t, ...);
-	int (*TIFFReadRGBAImageOriented)(TIFF*, uint32, uint32, uint32*, int, int);
+	int (*TIFFReadRGBAImageOriented)(TIFF*, Uint32, Uint32, Uint32*, int, int);
 	TIFFErrorHandler (*TIFFSetErrorHandler)(TIFFErrorHandler);
 } lib;
 
@@ -71,7 +71,7 @@ int IMG_InitTIF()
 			return -1;
 		}
 		lib.TIFFReadRGBAImageOriented =
-			(int (*)(TIFF*, uint32, uint32, uint32*, int, int))
+			(int (*)(TIFF*, Uint32, Uint32, Uint32*, int, int))
 			SDL_LoadFunction(lib.handle, "TIFFReadRGBAImageOriented");
 		if ( lib.TIFFReadRGBAImageOriented == NULL ) {
 			SDL_UnloadObject(lib.handle);
@@ -208,8 +208,6 @@ SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
 	SDL_Surface* surface = NULL;
 	Uint32 img_width, img_height;
 	Uint32 Rmask, Gmask, Bmask, Amask;
-	Uint32 x, y;
-	Uint32 half;
 
 	if ( !src ) {
 		/* The error message has been set in SDL_RWFromFile */
@@ -240,7 +238,7 @@ SDL_Surface* IMG_LoadTIF_RW(SDL_RWops* src)
 	if(!surface)
 		goto error;
 	
-	if(!lib.TIFFReadRGBAImageOriented(tiff, img_width, img_height, (uint32 *)surface->pixels, ORIENTATION_TOPLEFT, 0))
+	if(!lib.TIFFReadRGBAImageOriented(tiff, img_width, img_height, (Uint32 *)surface->pixels, ORIENTATION_TOPLEFT, 0))
 		goto error;
 
 	lib.TIFFClose(tiff);