Index: /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAMosaic.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAMosaic.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAMosaic.c	(revision 34044)
@@ -661,4 +661,7 @@
             good = false;
         }
+    }
+    if (!good) {
+	// XXX do something to address this?
     }
 
Index: /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPARead.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPARead.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPARead.c	(revision 34044)
@@ -957,10 +957,10 @@
         trimsec->y1 = naxis2 + trimsec->y1;
 
-    int maxSize;                        // Number of cols,rows in image
-    if (readdir == 1) {
-        maxSize = PS_MIN(naxis2, trimsec->y1 - trimsec->y0);
-    } else {
-        maxSize = PS_MIN(naxis1, trimsec->x1 - trimsec->x0);
-    }
+    // XX not used int maxSize;                        // Number of cols,rows in image
+    // XX not used if (readdir == 1) {
+    // XX not used     maxSize = PS_MIN(naxis2, trimsec->y1 - trimsec->y0);
+    // XX not used } else {
+    // XX not used     maxSize = PS_MIN(naxis1, trimsec->x1 - trimsec->x0);
+    // XX not used }
 
     int offset;                         // start of the segment
Index: /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAfileDefine.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/camera/pmFPAfileDefine.c	(revision 34044)
@@ -333,5 +333,5 @@
         psMetadataItem *fuzz = psMetadataLookup(scheme, "FUZZ"); // Quantisation fuzz?
         if (fuzz) {
-            if (fuzz->type != PS_TYPE_BOOL) {
+            if (fuzz->type != PS_DATA_BOOL) {
                 psWarning("FUZZ in compression scheme %s isn't boolean.", fitsType);
                 goto FITS_OPTIONS_DONE;
Index: /branches/eam_branches/ipp-20120601/psModules/src/camera/pmReadoutFake.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/camera/pmReadoutFake.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/camera/pmReadoutFake.c	(revision 34044)
@@ -332,5 +332,5 @@
 #define CONCEPT_SET_S32(CONCEPTS, NAME, OLD, NEW) { \
         psMetadataItem *item = psMetadataLookup(CONCEPTS, NAME); \
-        psAssert(item->type == PS_TYPE_S32, "Incorrect type: %x", item->type); \
+        psAssert(item->type == PS_DATA_S32, "Incorrect type: %x", item->type); \
         if (item->data.S32 == OLD) { \
             item->data.S32 = NEW; \
Index: /branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsStandard.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsStandard.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsStandard.c	(revision 34044)
@@ -118,5 +118,5 @@
     assert(concept);
     assert(cell);
-    assert(concept->type == PS_TYPE_F32);
+    assert(concept->type == PS_DATA_F32);
 
     float rn = concept->data.F32;       // Read noise
@@ -930,5 +930,5 @@
     psFree(timesysName);
 
-    if (!item || item->type != PS_TYPE_S32) {
+    if (!item || item->type != PS_DATA_S32) {
         psWarning("Unable to find %s --- assuming UTC", timesysName);
         return PS_TIME_UTC;
@@ -1258,7 +1258,7 @@
 #endif
       default:
-        if (concept->type == PS_TYPE_F32 && concept->data.F32 - (int)concept->data.F32 == 0) {
+        if (concept->type == PS_DATA_F32 && concept->data.F32 - (int)concept->data.F32 == 0) {
             offset = concept->data.F32;
-        } else if (concept->type == PS_TYPE_F64 && concept->data.F64 - (int)concept->data.F64 == 0) {
+        } else if (concept->type == PS_DATA_F64 && concept->data.F64 - (int)concept->data.F64 == 0) {
             offset = concept->data.F64;
         } else {
@@ -1558,5 +1558,5 @@
     assert(cameraFormat);
 
-    if (concept->type != PS_TYPE_S32) {
+    if (concept->type != PS_DATA_S32) {
         psError(PS_ERR_UNKNOWN, true, "Concept %s is not of type S32, as expected.\n", concept->name);
         return NULL;
Index: /branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsUpdate.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsUpdate.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/concepts/pmConceptsUpdate.c	(revision 34044)
@@ -30,5 +30,5 @@
             if (isfinite(gain)) {
                 psMetadataItem *rn = psMetadataLookup(cell->concepts, "CELL.READNOISE"); // Read noise
-                psAssert(rn && rn->type == PS_TYPE_F32, "Should be of the correct type");
+                psAssert(rn && rn->type == PS_DATA_F32, "Should be of the correct type");
                 rn->data.F32 *= gain;
                 psMetadataRemoveKey(cell->concepts, "CELL.READNOISE.UPDATE");
Index: /branches/eam_branches/ipp-20120601/psModules/src/config/pmConfigCommand.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/config/pmConfigCommand.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/config/pmConfigCommand.c	(revision 34044)
@@ -42,5 +42,5 @@
     psMetadataItem *item;               // Item from iteration
     while ((item = psMetadataGetAndIncrement(iter))) {
-        assert(item->type == PS_TYPE_S32);
+        assert(item->type == PS_DATA_S32);
         psStringAppend(command, " -trace %s %d", item->name, item->data.S32);
     }
Index: /branches/eam_branches/ipp-20120601/psModules/src/detrend/pmNonLinear.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/detrend/pmNonLinear.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/detrend/pmNonLinear.c	(revision 34044)
@@ -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(): "
Index: /branches/eam_branches/ipp-20120601/psModules/src/detrend/pmShutterCorrection.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/detrend/pmShutterCorrection.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/detrend/pmShutterCorrection.c	(revision 34044)
@@ -406,5 +406,4 @@
 
     // Check input sizes, generate first-pass statistics
-    psRegion refRegion;                 // Reference region
     psVector *refs = psVectorAlloc(num, PS_TYPE_F32); // Reference measurements
     psVectorInit(refs, 0);
@@ -441,5 +440,5 @@
             numCols = image->numCols;
             // define the reference region : a box of size 'size' at the center
-            refRegion = psRegionForSquare(0.5 * numCols, 0.5 * numRows, size);
+            // XXX unused psRegion refRegion = psRegionForSquare(0.5 * numCols, 0.5 * numRows, size);
             // Set up the sample regions : boxes of size 'size' at the 4 image corners
             for (int j = 0; j < MEASURE_SAMPLES; j++) {
Index: /branches/eam_branches/ipp-20120601/psModules/src/extras/pmVisualUtils.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/extras/pmVisualUtils.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/extras/pmVisualUtils.c	(revision 34044)
@@ -424,4 +424,6 @@
 	    nwritten = fwrite (line, 1, strlen(line), output);
         }
+	if (nwritten < 1) {
+	}
     }
 
Index: /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSource.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSource.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSource.c	(revision 34044)
@@ -1098,4 +1098,7 @@
 	if (!addNoise && !addModelVar) source->tmpFlags |= PM_SOURCE_TMPF_SUBTRACTED;
     }
+    if (!status) {
+	// XXX maybe raise an error or warning?
+    }
 
     return true;
@@ -1166,4 +1169,7 @@
 	status = pmModelSubWithOffset (target, source->maskObj, model, mode, maskVal, dx, dy);
     }
+    if (!status) {
+	// XXX raise an error or warning?
+    }
 
     // restore original values
@@ -1253,4 +1259,7 @@
     } else {
 	status = pmModelSubWithOffset (target, source->maskObj, model, mode, maskVal, dx, dy);
+    }
+    if (!status) {
+	// XXX raise an error or warning?
     }
 
Index: /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_CMP.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_CMP.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_CMP.c	(revision 34044)
@@ -65,5 +65,5 @@
     int i, type;
     // psMetadataItem *mdi;
-    psF32 *PAR, *dPAR;
+    psF32 *PAR;
     float lsky = 0;
     bool status;
@@ -130,5 +130,4 @@
 
         PAR = model->params->data.F32;
-        dPAR = model->dparams->data.F32;
 
         type = pmSourceGetDophotType (source);
@@ -174,5 +173,5 @@
     bool status;
     int Ninstar;
-    psF32 *PAR, *dPAR;
+    psF32 *PAR;
     psEllipseAxes axes;
 
@@ -273,5 +272,4 @@
 
             PAR = source->modelPSF->params->data.F32;
-            dPAR = source->modelPSF->dparams->data.F32;
 
             PAR[PM_PAR_SKY] = pow (atof (array->data[5]), 10.0);
Index: /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_PS1_CAL_0.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_PS1_CAL_0.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_PS1_CAL_0.c	(revision 34044)
@@ -322,4 +322,6 @@
 }
 
+# define WRITE_AP_DATA 0
+
 bool pmSourcesWrite_PS1_CAL_0_XSRC (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname, psMetadata *recipe)
 {
@@ -338,4 +340,5 @@
     }
 
+# if (WRITE_AP_DATA)
     bool calMags = false;
     bool status1 = false;
@@ -350,4 +353,5 @@
 	calMags = true;
     }
+# endif
 
     // create a header to hold the output data
@@ -424,5 +428,5 @@
         psMetadataAdd (row, PS_LIST_TAIL, "Y_EXT_SIG",        PS_DATA_F32, "Sigma in EXT y coordinate",                  yErr);
 
-# if (0)
+# if (WRITE_AP_DATA)
 	// Petrosian measurements
 	// XXX insert header data: petrosian ref radius, flux ratio
Index: /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SMPDATA.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SMPDATA.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SMPDATA.c	(revision 34044)
@@ -63,5 +63,5 @@
     psMetadata *row;
     int i;
-    psF32 *PAR, *dPAR;
+    psF32 *PAR;
     bool status;
     psEllipseAxes axes;
@@ -85,5 +85,4 @@
         if (model != NULL) {
 	    PAR = model->params->data.F32;
-	    dPAR = model->dparams->data.F32;
 	    xPos = PAR[PM_PAR_XPOS];
 	    yPos = PAR[PM_PAR_YPOS];
@@ -145,5 +144,5 @@
 
     bool status;
-    psF32 *PAR, *dPAR;
+    psF32 *PAR;
     psEllipseAxes axes;
     float lsky;
@@ -176,5 +175,4 @@
 
         PAR = model->params->data.F32;
-        dPAR = model->dparams->data.F32;
 
         psMetadata *row = table->data[i];
Index: /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SX.c
===================================================================
--- /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SX.c	(revision 34043)
+++ /branches/eam_branches/ipp-20120601/psModules/src/objects/pmSourceIO_SX.c	(revision 34044)
@@ -56,5 +56,5 @@
     PS_ASSERT_PTR_NON_NULL(filename, false);
 
-    psF32 *PAR, *dPAR;
+    psF32 *PAR;
     psEllipseAxes axes;
 
@@ -77,5 +77,4 @@
 
         PAR = model->params->data.F32;
-        dPAR = model->dparams->data.F32;
 
         // pmSourceSextractType (source, &type, &flags);
