Commits

Anonymous committed 495470b

- kill compiler warnings
- nuke unused variables

  • Participants
  • Parent commits 81ce789
  • Branches GD-2.0

Comments (0)

Files changed (1)

File src/gd_crop.c

  */
 
 #include <gd.h>
+#include <stdlib.h>
 
 static int gdGuessBackgroundColorFromCorners(gdImagePtr im, int *color);
 static int gdColorMatch(gdImagePtr im, int col1, int col2, int threshold);
 		}
 	}
 
-	/* Nothing to do > bye */
+	/* Nothing to do > bye 
+	 * Duplicate the image?
+	 */
 	if (y == height - 1) {
-		return;
+		return NULL;
 	}
 
 	crop.y = y -1;
 	const int height = gdImageSY(im);
 
 	int x,y;
-	int corners, match;
+	int match;
 	gdRect crop;
 
 	crop.x = 0;
 	crop.width = 0;
 	crop.height = 0;
 
+	/* Pierre: crop everything sounds bad */
 	if (threshold >= 255) {
-		return;
+		return NULL;
 	}
 
 	/* TODO: Add gdImageGetRowPtr and works with ptr at the row level
 		}
 	}
 
-	/* Nothing to do > bye */
+	/* Piere
+	 * Nothing to do > bye 
+	 * Duplicate the image?
+	 */
 	if (y == height - 1) {
-		return;
+		return NULL;
 	}
 
 	crop.y = y -1;