Commits

Anonymous committed 81ce789

- kill compiler warnings
- nuke unused vars

Comments (0)

Files changed (1)

 #include <stdlib.h>
 #include <limits.h>
 
+#include "gdhelpers.h"
+
 #ifdef HAVE_LIBTIFF
 
 #include "tiff.h"
 /* TIFFCloseProc tiff_closeproc - used to finally close the TIFF file */
 static int tiff_closeproc(thandle_t clientdata)
 {
-	tiff_handle *th = (tiff_handle *)clientdata;
+	/*tiff_handle *th = (tiff_handle *)clientdata;
 	gdIOCtx *ctx = th->ctx;
 
-	/*(ctx->gd_free)(ctx);*/
+	(ctx->gd_free)(ctx);*/
 
 	return 0;
 }
 	int width, height;
 	int color;
 	char *scan;
-	int rowsperstrip;
 	int samplesPerPixel = 3;
 	int bitsPerSample;
 	int transparentColorR = -1;
 		int          extra,
 		int          align)
 {
-	unsigned char *buffer;
 	int x = startx, y = starty;
 	int src_x, src_y;
 	int k;
 		int          extra,
 		int          align)
 {
-	unsigned char *dst;
-	int    gray, red, green, blue, alpha;
-	int    x, y, i;
+	int    red, green, blue, alpha;
+	int    x, y;
 
 	switch (photometric) {
 		case PHOTOMETRIC_PALETTE:
 	int tile_width, tile_height;
 	int  x, y, height, width;
 	unsigned char *buffer;
-	int    i;
 
 	if (!TIFFGetField (tif, TIFFTAG_PLANARCONFIG, &planar)) {
 		planar = PLANARCONFIG_CONTIG;
 			}
 		}
 	}
+	return TRUE;
 }
 
 static int createFromTiffLines(TIFF *tif, gdImagePtr im, uint16 bps, uint16 photometric,
 {
 	uint16  planar;
 	uint32 im_height, im_width, im_line_size;
-	int y, i;
+	int y;
 
 	unsigned char *buffer;
 
 	}
 
 	if (!TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &im_width)) {
-		fprintf(stderr, "Can't fetch TUFF width", y);
+		fprintf(stderr, "Can't fetch TUFF width for %i", y);
 		return FALSE;
 	}
 
 			/* TODO: implement a reader for separate panes. We detect this case earlier for now and use force_rgb */
 	}
 
-error:
 	gdFree(buffer);
 	return GD_SUCCESS;
 }
 
 static int createFromTiffRgba(TIFF * tif, gdImagePtr im) 
 {
-	int r, g, b, a;
+	int a;
 	int x, y;
 	int alphaBlendingFlag = 0;
 	int color;
 	int width, height;
 	uint16 extra, *extra_types;
 	uint16 planar;
-	float layer_offset_y_float, layer_offset_x_float;
-	int		layer_offset_y, layer_offset_x;
 	char	has_alpha, is_bw, is_gray;
 	char	flip_horizontal, flip_vertical;
 	char	force_rgba = FALSE;
 
 	th = new_tiff_handle(infile);
 	if (!th) {
-		return;
+		return NULL;
 	}
 
 	tif = TIFFClientOpen("", "rb", th, tiff_readproc,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.