Index: trunk/psLib/src/imageops/psImageGeomManip.c
===================================================================
--- trunk/psLib/src/imageops/psImageGeomManip.c	(revision 33089)
+++ trunk/psLib/src/imageops/psImageGeomManip.c	(revision 34089)
@@ -580,5 +580,4 @@
     psS32 outRows;
     psS32 outCols;
-    psS32 elementSize;
     psElemType type;
 
@@ -594,5 +593,5 @@
     outCols = input->numCols;
     type = input->type.type;
-    elementSize = PSELEMTYPE_SIZEOF(type);
+    // XXX unused psS32 elementSize = PSELEMTYPE_SIZEOF(type);
     out = psImageRecycle(out, outCols, outRows, type);
 
Index: trunk/psLib/src/imageops/psImageInterpolate.c
===================================================================
--- trunk/psLib/src/imageops/psImageInterpolate.c	(revision 33089)
+++ trunk/psLib/src/imageops/psImageInterpolate.c	(revision 34089)
@@ -461,4 +461,10 @@
     }
 
+#define INTERPOLATE_CHECK() \
+    if (xMin < 0) { /* XXX warn or error? */ } \
+    if (yMin < 0) { /* XXX warn or error? */ } \
+    if (xMax >= image->numCols) { /* XXX warn or error? */ } \
+    if (yMax >= image->numRows) { /* XXX warn or error? */ } \
+
 // Determine the result of the interpolation after all the math has been done
 static psImageInterpolateStatus interpolateResult(const psImageInterpolation *interp,
@@ -523,4 +529,5 @@
     }
     INTERPOLATE_RANGE();
+    INTERPOLATE_CHECK();
 
     // Get the appropriate kernels
@@ -779,4 +786,5 @@
     }
     INTERPOLATE_RANGE();
+    INTERPOLATE_CHECK();
 
     // Get the appropriate kernels
@@ -989,4 +997,5 @@
     INTERPOLATE_SETUP(x, y);
     xExact = yExact = false;
+    if (xExact && yExact) { /* possible alternative */ }
 
     psF32 xKernel[size], yKernel[size]; // Interpolation kernels
@@ -1038,4 +1047,5 @@
     INTERPOLATE_SETUP(x, y);
     xExact = yExact = false;
+    if (xExact && yExact) { /* possible alternative */ }
 
     psF32 xKernel[size], yKernel[size]; // Interpolation kernels
Index: trunk/psLib/src/imageops/psImageStructManip.c
===================================================================
--- trunk/psLib/src/imageops/psImageStructManip.c	(revision 33089)
+++ trunk/psLib/src/imageops/psImageStructManip.c	(revision 34089)
@@ -212,4 +212,6 @@
     elementSize = PSELEMTYPE_SIZEOF(inDatatype);
 
+    if (0) { fprintf (stderr, "%d elements, %d total memory\n", elements, elements * elementSize); }
+
     output = p_psImageRecycle(file, lineno, func, output, numCols, numRows, type);
     P_PSIMAGE_SET_COL0(output, input->col0);
