Index: trunk/psModules/src/detrend/pmNonLinear.c
===================================================================
--- trunk/psModules/src/detrend/pmNonLinear.c	(revision 29935)
+++ trunk/psModules/src/detrend/pmNonLinear.c	(revision 34085)
@@ -82,7 +82,7 @@
     }
     PS_ASSERT_PTR_NON_NULL(outFlux,NULL);
-    psS32 tableSize = inFlux->n;
+    // XXX unused psS32 tableSize = inFlux->n;
     if (inFlux->n != outFlux->n) {
-        tableSize = PS_MIN(inFlux->n, outFlux->n);
+        // XXX unused tableSize = PS_MIN(inFlux->n, outFlux->n);
         psLogMsg(__func__, PS_LOG_WARN,
                  "WARNING: pmNonLinear.c: pmNonLinearityLookup(): "
@@ -329,4 +329,6 @@
 
     bin = correction_fluxes->n - 1;
+    psTrace("psModules.nonlin",6,"NLMN: %f %d %f %f\n",flux,bin,correction_fluxes->data.F32[0],correction_fluxes->data.F32[bin]);
+    if (bin < 0) { /* warn? */ }
     if (flux < correction_fluxes->data.F32[0]) {
 	return(0.0);
@@ -357,4 +359,5 @@
     bin = correction_fluxes->n - 1;
     psTrace("psModules.nonlin",6,"NLMN: %f %d %f %f\n",flux,bin,correction_fluxes->data.F32[0],correction_fluxes->data.F32[bin]);
+    if (bin < 0) { /* warn? */ }
     if (flux < correction_fluxes->data.F32[0]) {
 	return(0.0);
