Index: /branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_ops.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_ops.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/get2mass_ops.c	(revision 33985)
@@ -73,5 +73,4 @@
 
   char *ptr;
-  char Jquality, Hquality, Kquality;
   double J, dJ, H, dH, K, dK;
   e_time time;
@@ -99,4 +98,5 @@
 
 # if (0)
+  char Jquality, Hquality, Kquality;
   /* old code to filter on the ph_qual flag for this filter (field 19) */
   if (SELECT_2MASS_QUALITY != NULL) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/loadwise_rawdata.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/loadwise_rawdata.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/addstar/src/loadwise_rawdata.c	(revision 33985)
@@ -14,5 +14,5 @@
   int i, j, verbose;
   int Nstars, NSTARS, Ntstars, NTSTARS;
-  int Nbyte, Nextra, Ntotal, offset;
+  int Nbyte, Nextra, offset;
 
   double Rmin, Rmax, Dmin, Dmax;
@@ -37,5 +37,4 @@
 
   Nextra = 0;  // number excess bytes from lsat partial row
-  Ntotal = 0;  // track the total number of bytes read 
   while ((Nbyte = fread (&buffer[Nextra], 1, NBYTE-Nextra, f)) != 0) {
     if (Nbyte == -1) Shutdown ("error reading from raw file %s", filename);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/delstar/src/args.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/delstar/src/args.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/delstar/src/args.c	(revision 33985)
@@ -26,5 +26,4 @@
   int N;
   double trange;
-  time_t tmp;
 
   /* check for help request */
@@ -77,7 +76,8 @@
     if (ohana_str_to_time (argv[N], &END)) { 
       if (START > END) {
+	time_t tmp;
 	tmp   = START;
 	START = END;
-	END   = START;
+	END   = tmp;
       }
       remove_argument (N, argc, argv);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/delstar/src/find_matches.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/delstar/src/find_matches.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/delstar/src/find_matches.c	(revision 33985)
@@ -5,5 +5,5 @@
   int drop;
   off_t i, j, k, n, m, N, M, averef;
-  off_t *next_meas, *next_miss, *ave_miss, last, last_miss;
+  off_t *next_meas, *next_miss, *ave_miss;
   off_t Nave, Nmeas, NMEAS, Nmiss;
   off_t Nmeasfound, Nsecfilt;
@@ -29,5 +29,4 @@
   }
   next_meas[i] = -1;
-  last = i;
   /* set up pointers for linked list of missing */
   for (i = 0; i < Nmiss - 1; i++) {
@@ -35,5 +34,4 @@
   }
   next_miss[i] = -1;
-  last_miss = i;
   /* set up references for missing to average */
   for (i = 0; i < Nave; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/elixir/src/CheckMessages.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/elixir/src/CheckMessages.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/elixir/src/CheckMessages.c	(revision 33985)
@@ -10,5 +10,5 @@
 int CheckMessages () {
   
-  int status, Message;
+  int status;
   struct timeval now;
   char *message, *p, *p2;
@@ -27,6 +27,4 @@
   then = now;
   if (!status) return (FALSE);
-
-  Message = 0;
 
   /* loop over all lines in message */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/gastro/src/gcenter.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/gastro/src/gcenter.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/gastro/src/gcenter.c	(revision 33985)
@@ -8,5 +8,5 @@
 
   double mean, sigma, gx, gy, gx0, gy0, n, SearchRadius;
-  int NPIX, minN, Nmin, Nmin0;
+  int NPIX, minN, Nmin0;
   int i, j, k;
   double *N, *DX, *DY, *D2, *tX1, *tY1, *tX2, *tY2;
@@ -154,5 +154,4 @@
       Fmin = Fmin0;
       Smin = Smin0;
-      Nmin = Nmin0;
       Xmin = Xmin0;
       Ymin = Ymin0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/gastro/src/gstars.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/gastro/src/gstars.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/gastro/src/gstars.c	(revision 33985)
@@ -27,5 +27,5 @@
   Header header, theader;
   FILE *f;
-  int j, Ninstar, nstar, rnumber, N, Nstars, nbytes, Nbytes;
+  int j, Ninstar, nstar, rnumber, N, Nstars, nbytes;
   SStars *stars;
   char *buffer;
@@ -154,5 +154,4 @@
   }
   ALLOCATE (stars, SStars, Nstars);
-  Nbytes = Nstars*BYTES_STAR;
 
   /* re-open file for stars */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/getusnob.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/getusnob.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/getusnob.c	(revision 33985)
@@ -13,5 +13,5 @@
   double DEC1;
   double uR, uD;
-  float mB1, mB2, mR1, mR2, mB, mR;
+  float mB1, mB2, mR1, mR2, mR, mB;
   int iDEC0, iDEC1, iRA0, iRA1;
   int spd, spd_start, spd_end;
@@ -133,5 +133,5 @@
       }
       
-      stars[Nusno].M = mB;
+      stars[Nusno].M = TRUE ? mB : mR; // optionally use blue or red (but not activated)
       stars[Nusno].R += uR*(epoch - 2000.0);
       stars[Nusno].D += uD*(epoch - 2000.0);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/gstars2.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/gstars2.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/gstars2.c	(revision 33985)
@@ -7,5 +7,5 @@
   double det;
   off_t Nskip;
-  int NX, NY, FoundAstrom, extend, naxis;
+  int NX, NY, FoundAstrom, naxis;
   StarData *stars;
   FILE *f;
@@ -125,5 +125,4 @@
   /* read from FITS table or from text table */
   /* Is NAXIS == 0 a better test?? */
-  extend = FALSE;
   gfits_scan_alt (&Target[0].header, "NAXIS",  "%t", 1, &naxis);
   if ((naxis == 0) && !TEXTMODE) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/rtext.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/rtext.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/gastro2/src/rtext.c	(revision 33985)
@@ -8,5 +8,5 @@
 
   char *buffer;
-  int i, N, Nbytes, nbytes, Ninstar, Nstars, NSTARS;
+  int i, N, nbytes, Ninstar, Nstars, NSTARS;
   double dmag, type;
   StarData *stars;
@@ -14,5 +14,4 @@
   NSTARS = *nstars;
   ALLOCATE (stars, StarData, MAX (NSTARS, 1));
-  Nbytes = NSTARS*BYTES_STAR;
 
   N = Nstars = 0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/gcompare/src/input.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/gcompare/src/input.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/gcompare/src/input.c	(revision 33985)
@@ -11,10 +11,8 @@
   
   data_type data;
-  int i, status, n, NVALUES, NBYTES, nbytes;
+  int i, status, NVALUES, NBYTES, nbytes;
   FILE *f;
   char dummy_line[1000], *next;
   
-  n = 0;
-
   if (!strcmp (filename, "-")) {
     f = stdin;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/GetFileMode.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/GetFileMode.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/GetFileMode.c	(revision 33985)
@@ -14,6 +14,6 @@
   gfits_scan_alt (header, "EXTEND", "%t", 1, &extend);
     
-  if ((Naxis == 2) || !simple) {
-    if (!strcmp (&ctype[4], "-WRP")) {
+  if (haveNaxis && ((Naxis == 2) || !simple)) {
+    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
       return MOSAIC_CMP;
     }
Index: /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/edge_check.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/edge_check.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/edge_check.c	(revision 33985)
@@ -4,5 +4,4 @@
 
   double theta1, theta2;
-  double Theta1, Theta2;
 
   theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); 
@@ -17,6 +16,4 @@
   }
 
-  Theta1 = theta1;
-  Theta2 = theta2;
   theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 
   theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/select_by_region.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/select_by_region.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/getstar/src/select_by_region.c	(revision 33985)
@@ -4,5 +4,5 @@
 int select_by_region (Catalog *output, Catalog *catalog, SkyRegion *region, int start, int end) {
 
-  int i, j, Nm, offset, m, Nsecfilt, code, Nsec;
+  int i, j, offset, m, Nsecfilt, code, Nsec;
   int Nave, NAVE, Nmeas, NMEAS, needMeas;
   double R, D, AREA;
@@ -140,8 +140,6 @@
     }
 
-    Nm = 0;
-    offset = catalog[0].average[i].measureOffset;
-
     if (needMeas) {
+      offset = catalog[0].average[i].measureOffset;
       for (j = 0; j < catalog[0].average[i].Nmeasure; j++) {
 	output[0].measure[Nmeas] = catalog[0].measure[offset + j];
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imclean/src/LoadStarsChad.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imclean/src/LoadStarsChad.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imclean/src/LoadStarsChad.c	(revision 33985)
@@ -10,5 +10,4 @@
   int status;
   double x, y, m, sky, lsky;
-  char *buffer;
   int Mhist[HIST_BINS], Shist[HIST_BINS], bin, sum;
   double FWHMx, FWHMy, angle, flux;
@@ -16,6 +15,4 @@
   double saturate, complete;
   char line[256];
-
-  ALLOCATE (buffer, char, CHAR_LINE*NBLOCK);
 
   f = fopen (filename, "r");
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imclean/src/LoadStarsSex.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imclean/src/LoadStarsSex.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imclean/src/LoadStarsSex.c	(revision 33985)
@@ -13,7 +13,7 @@
   double x, y, m, dm, sky, lsky, ftype;
   char *buffer;
-  int Mhist[HIST_BINS], Shist[HIST_BINS], n[10], bin, sum, flags;
+  int Mhist[HIST_BINS], Shist[HIST_BINS], bin, sum, flags;
   double A, A2, S2, FWHMx, FWHMy, angle, Mgal, Map;
-  int gotFWHM, satfound, done;
+  int satfound, done;
   double saturate, complete;
 
@@ -31,7 +31,5 @@
   /* zero things that will sum */
   N = A = A2 = S2 = 0;
-  gotFWHM = FALSE;
   for (i = 0; i < HIST_BINS; i++) { Mhist[i] = Shist[i] = 0; }
-  for (i = 1; i <= 9; i++) { n[i] = 0; }
 
   Nstars = 0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/detrend/altpath.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/detrend/altpath.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/detrend/altpath.c	(revision 33985)
@@ -6,9 +6,8 @@
   int status, found;
   off_t i, j, n, Nlist;
-  off_t *list, *current;
+  off_t *list;
   char *dBPath, infile[256], outfile[256], line[1024];
   struct stat statbuf;
 
-  ALLOCATE (current, off_t, Nimage);
   ALLOCATE (list, off_t, Nimage);
   Nlist = 0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imphot/db_load.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imphot/db_load.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imphot/db_load.c	(revision 33985)
@@ -7,5 +7,5 @@
 
   int Nx, Ny, Naxis;
-  int mode, status;
+  int mode;
 
   /* database name must be set first */
@@ -31,8 +31,8 @@
   
   /* how do we decide if it is text or fits? must examine header */
-  if (FITS) {
-    status = rfits (db);
+  if (mode == FITS) {
+    rfits (db);
   } else {
-    status = rtext (db);
+    rtext (db);
   }
   return (TRUE);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imphot/output.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imphot/output.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imphot/output.c	(revision 33985)
@@ -4,9 +4,7 @@
 int output (Image *image, off_t *match, off_t Nmatch) {
 
-  int status;
-
   /* output the selected entries */
   if (options.table != (char *) NULL) {
-    status = DumpFitsTable (options.table, image, match, Nmatch);
+    DumpFitsTable (options.table, image, match, Nmatch);
     return (TRUE);
   } 
@@ -14,5 +12,5 @@
   /* output the selected entries */
   if (options.bintable != (char *) NULL) {
-    status = DumpFitsBintable (options.bintable, image, match, Nmatch);
+    DumpFitsBintable (options.bintable, image, match, Nmatch);
     return (TRUE);
   } 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/cadc.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/cadc.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/cadc.c	(revision 33985)
@@ -184,11 +184,5 @@
 off_t GetREFCCD (RegImage *image, off_t *index, off_t *entry, off_t Nindex, off_t start) {
   
-  off_t i, N, NMATCH;
-  off_t *match;
-
-  /* create output index */
-  N = 0;
-  NMATCH = 1000;
-  ALLOCATE (match, off_t, NMATCH);
+  off_t i;
 
   /* find unique sequences */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/imregclient.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/imregclient.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/imregclient.c	(revision 33985)
@@ -4,5 +4,5 @@
 int imregclient (char *fitsfile, char *statfile, char *datfile) {
 
-  int i, Nentry, Nslice, status, tmpint;
+  int i, Nentry, Nslice, tmpint;
   FILE *f;
   RegImage *image;
@@ -35,5 +35,5 @@
       exit (1);
     }
-    status = fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm);
+    fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm);
     image[0].ccd = tmpint;
     fclose (f);
@@ -46,5 +46,4 @@
       exit (1);
     }
-    status = 3;
     Nslice = image[0].seq;
     Nentry = Nslice + 1;
@@ -52,5 +51,5 @@
     for (i = 0; i < Nentry; i++) {
       image[i] = image[0];
-      status = fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm);
+      fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm);
       image[i].seq = tmpint;
       if (image[i].seq == Nslice) continue;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/modify.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/modify.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/imreg/modify.c	(revision 33985)
@@ -6,5 +6,5 @@
   off_t i, j, Nold;
   char *tmppath;
-  char *ext, *root, *path, dist;
+  char *ext, *root, *path;
 
   Nold = 0;
@@ -16,7 +16,8 @@
     ALLOCATE (tmppath, char, 128);
   }
-  if (output.modify_dist) {
-    dist = (output.dist) ? 0xff : ~IMREG_DIST;
-  }
+  // XXX this code is not used, why was it here?
+  // if (output.modify_dist) {
+  //   dist = (output.dist) ? 0xff : ~IMREG_DIST;
+  // }
 
   /* modify the selected entries */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/imregister/src/imphotmerge.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/imregister/src/imphotmerge.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/imregister/src/imphotmerge.c	(revision 33985)
@@ -18,5 +18,5 @@
   int VERBOSE, PHOTCODE, dbstate;
   int PhotCodeSelect, Nin;
-  char *FitsOutput, *NameSelect;
+  char *NameSelect;
   int NameSelectLength;
 
@@ -53,10 +53,10 @@
   }
 
-  FitsOutput = (char *) NULL;
-  if ((N = get_argument (argc, argv, "-fits"))) {
-    remove_argument (N, &argc, argv);
-    FitsOutput = strcreate (argv[N]);
-    remove_argument (N, &argc, argv);
-  }
+  // char *FitsOutput = (char *) NULL;
+  // if ((N = get_argument (argc, argv, "-fits"))) {
+  //   remove_argument (N, &argc, argv);
+  //   FitsOutput = strcreate (argv[N]);
+  //   remove_argument (N, &argc, argv);
+  // }
 
   VERBOSE = FALSE;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/CheckVisual.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/CheckVisual.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/CheckVisual.c	(revision 33985)
@@ -10,5 +10,5 @@
 
   int i, Nfound, N;
-  int isColor, isDefault;
+  int isDefault;
   XVisualInfo *visual_list, visual_temp;
   unsigned long planes[3];
@@ -35,10 +35,10 @@
   
   // set these based on selected visual
-  isColor = isDefault = FALSE;
+  isDefault = FALSE;
 
   // attempt to select the most desirable type of visual: TrueColor
   for (i = 0; (i < Nfound) && (visual_list[i].class != TrueColor); i++);
   if (i != Nfound) {
-    isColor = TRUE;
+    // isColor = TRUE;
     if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
     isDefault = (graphic[0].visual == visual_list[i].visual);
@@ -52,5 +52,5 @@
   for (i = 0; (i < Nfound) && (visual_list[i].class != DirectColor); i++);
   if (i != Nfound) {
-    isColor = TRUE;
+    // isColor = TRUE;
     if (DEBUG) fprintf (stderr, "visual class is %d\n", visual_list[i].class);
     isDefault = (graphic[0].visual == visual_list[i].visual);
@@ -64,5 +64,5 @@
   for (i = 0; (i < Nfound) && (visual_list[i].class != PseudoColor); i++);
   if (i != Nfound) {
-    isColor = TRUE;
+    // isColor = TRUE;
     if (DEBUG) fprintf (stderr, "selected visual class is %d\n", visual_list[i].class);
     isDefault = (graphic[0].visual == visual_list[i].visual);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/DrawFrame.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/DrawFrame.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/DrawFrame.c	(revision 33985)
@@ -91,5 +91,5 @@
   int pos, dir, fontsize;
   double size, n, pad;
-  char string[64], *fontname;
+  char string[64];
 
   double fx  = axis->fx;
@@ -130,5 +130,6 @@
     int xt, yt;
 
-    fontname = GetRotFont (&fontsize);
+    // char *fontname is returned by GetRotFont, but not used here
+    GetRotFont (&fontsize);
     
     pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : fontsize + 4.0;
@@ -231,6 +232,6 @@
 
   TickMarkData *ticks;
-  double range, major, minor, first, value, dPixels, overshoot;
-  int i, NTICKS, nPixels, done, ifirst, nsignif;
+  double range, major, minor, first, value;
+  int i, NTICKS, done, ifirst, nsignif;
 
   *nticks = 0;
@@ -249,6 +250,6 @@
 
   // length of the axis in pixels
-  nPixels = hypot(axis->dfx, axis->dfy);
-  dPixels = nPixels / range; // axis pixel-scale
+  // int nPixels = hypot(axis->dfx, axis->dfy);
+  // double dPixels = nPixels / range; // axis pixel-scale
 
   AxisTickScale (axis, &major, &minor, &nsignif);
@@ -263,5 +264,5 @@
   
   // allow undershoot by 1 pixel
-  overshoot = (axis->min - first) * dPixels;
+  // double overshoot = (axis->min - first) * dPixels;
   // if (overshoot > 0.5) {
   //   if (range > 0) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/EraseOverlay.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/EraseOverlay.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/EraseOverlay.c	(revision 33985)
@@ -4,5 +4,4 @@
 
   int i, N;
-  Graphic *graphic;
   Section *section;
   KapaImageWidget *image;
@@ -11,5 +10,4 @@
   KiiScanCommand (sock, 16, "%*s %d", &N);
 
-  graphic = GetGraphic();
   section = GetActiveSection();
   image = section->image;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/JPEGit24.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/JPEGit24.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/JPEGit24.c	(revision 33985)
@@ -33,9 +33,8 @@
   int i_start, i_end, j_start, j_end;
   int I_start, J_start;
-  int dropback;  /* this is a bit of a kludge... */
-  int dx, dy, DX, DY, inDX, inDY;
+  int dx, dy, DX, inDX, inDY;
   int quality;
   int expand_in, expand_out;
-  double expand, Ix, Iy;
+  double Ix, Iy;
   unsigned char *out_pix;
   unsigned short *in_pix, *in_pix_ref;
@@ -85,12 +84,10 @@
 
   assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (image[0].picture.expand > 0) {
-    expand = 1 / (1.0*image[0].picture.expand);
     expand_out = image[0].picture.expand;
     expand_in  = 1;
   }
   if (image[0].picture.expand < 0) {
-    expand = fabs((double)image[0].picture.expand);
     expand_out = 1;
     expand_in  = -image[0].picture.expand;
@@ -100,5 +97,5 @@
   dy = image[0].picture.dy;
   DX = image[0].image[0].matrix.Naxis[0];
-  DY = image[0].image[0].matrix.Naxis[1];
+  // DY = image[0].image[0].matrix.Naxis[1];
 
   // i_start, j_start are the closest lit screen pixel to 0,0
@@ -118,7 +115,4 @@
   inDX = image[0].picture.flipx ? -1 : +1;
   inDY = image[0].picture.flipy ? -1 : +1;
-
-  dropback = expand_out - (i_end - i_start) % expand_out;
-  if ((i_end - i_start) % expand_out == 0) dropback = 0;
 
   /* output line buffer */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Layout.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Layout.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Layout.c	(revision 33985)
@@ -5,5 +5,4 @@
 
   int N;
-  Section *section;
   char *namedSocket = NULL;
   
@@ -43,4 +42,5 @@
 
   /* create basic section, empty of image or graph */
-  section = AddSection ("default", 0.0, 0.0, 1.0, 1.0, -1);
+  // Section *section is returned by not used
+  AddSection ("default", 0.0, 0.0, 1.0, 1.0, -1);
 }
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PSFrame.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PSFrame.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PSFrame.c	(revision 33985)
@@ -57,5 +57,5 @@
   int pos, dir, fontsize;
   double size, n, pad;
-  char string[64], *fontname;
+  char string[64];
 
   double fx  = axis->fx;
@@ -90,5 +90,6 @@
     int xt, yt;
 
-    fontname = GetRotFont (&fontsize);
+    // char *fontname is returned by not needed
+    GetRotFont (&fontsize);
 
     pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : 0.8*fontsize + 1.0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PSPixmap.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PSPixmap.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PSPixmap.c	(revision 33985)
@@ -153,8 +153,7 @@
   int i_start, i_end, j_start, j_end;
   int I_start, J_start;
-  int dropback;  /* this is a bit of a kludge... */
-  int dx, dy, DX, DY, inDX, inDY, Xs, Ys;
+  int dx, dy, DX, inDX, inDY;
   int expand_in, expand_out;
-  double expand, Ix, Iy;
+  double Ix, Iy;
   unsigned short *in_pix, *in_pix_ref;
   unsigned char *pixel1, *pixel2, *pixel3;
@@ -174,22 +173,17 @@
 
   assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (image[0].picture.expand > 0) {
-    expand = 1 / (1.0*image[0].picture.expand);
     expand_out = image[0].picture.expand;
     expand_in  = 1;
   }
   if (image[0].picture.expand < 0) {
-    expand = fabs((double)image[0].picture.expand);
     expand_out = 1;
     expand_in  = -image[0].picture.expand;
   }
 
-  Xs = image[0].picture.x;
-  Ys = image[0].picture.y;
   dx = image[0].picture.dx;
   dy = image[0].picture.dy;
   DX = image[0].image[0].matrix.Naxis[0];
-  DY = image[0].image[0].matrix.Naxis[1];
 
   // i_start, j_start are the closest lit screen pixel to 0,0
@@ -209,7 +203,4 @@
   inDX = image[0].picture.flipx ? -1 : +1;
   inDY = image[0].picture.flipy ? -1 : +1;
-
-  dropback = expand_out - (i_end - i_start) % expand_out;
-  if ((i_end - i_start) % expand_out == 0) dropback = 0;
 
   in_pix_ref  = &image[0].pixmap[DX*(int)MAX(Iy,0) + (int)MAX(Ix,0)];
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PaintOverlay.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PaintOverlay.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/PaintOverlay.c	(revision 33985)
@@ -5,5 +5,5 @@
   int i;
   int dX, dY, dx, dy;
-  int Xmin, Ymin, Xmax, Ymax, Xrange, Yrange;
+  int Xmin, Ymin, Xmax, Ymax;
   double t, expand, X, Y, pX, pY;
  
@@ -23,6 +23,4 @@
   Xmax = image[0].picture.x + image[0].picture.dx;
   Ymax = image[0].picture.y + image[0].picture.dy;
-  Xrange = image[0].picture.dx;
-  Yrange = image[0].picture.dy;
 
   for (i = 0; i < image[0].overlay[N].Nobjects; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap16.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap16.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap16.c	(revision 33985)
@@ -13,6 +13,6 @@
   int I_start, J_start;
   int dropback, inDX, inDY;
-  int dx, dy, DX, DY;
-  double expand, Ix, Iy;
+  int dx, dy, DX;
+  double Ix, Iy;
   int expand_in, expand_out;
   OUT_TYPE *out_pix, *out_pix2, *data;
@@ -49,12 +49,10 @@
   if (picture[0].expand == -1) picture[0].expand = 1;
   assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (picture[0].expand > 0) {
-    expand = 1 / (1.0*picture[0].expand);
     expand_out = picture[0].expand;
     expand_in  = 1;
   }
   if (picture[0].expand < 0) {
-    expand = fabs((double)picture[0].expand);
     expand_out = 1;
     expand_in  = -picture[0].expand;
@@ -65,5 +63,5 @@
   dy = picture[0].dy;
   DX = matrix[0].Naxis[0];
-  DY = matrix[0].Naxis[1];
+  // int DY = matrix[0].Naxis[1];
 
   // i_start, j_start are the closest lit screen pixel to 0,0
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap24.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap24.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap24.c	(revision 33985)
@@ -7,6 +7,6 @@
   int I_start, J_start;
   int dropback, extra, inDX, inDY;
-  int dx, dy, DX, DY;
-  double expand, Ix, Iy;
+  int dx, dy, DX;
+  double Ix, Iy;
   int expand_in, expand_out;
   unsigned char *out_pix, *out_pix2, *data;
@@ -33,14 +33,12 @@
   if (picture[0].expand == -1) picture[0].expand = 1;
   assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (picture[0].expand == 0) /* set up expansions */
     picture[0].expand = 1;
   if (picture[0].expand > 0) {
-    expand = 1 / (1.0*picture[0].expand);
     expand_out = picture[0].expand;
     expand_in  = 1;
   }
   if (picture[0].expand < 0) {
-    expand = fabs((double)picture[0].expand);
     expand_out = 1;
     expand_in  = -picture[0].expand;
@@ -50,5 +48,5 @@
   dy = picture[0].dy;
   DX = matrix[0].Naxis[0];
-  DY = matrix[0].Naxis[1];
+  // int DY = matrix[0].Naxis[1];
 
   // each row is padded to a 4-byte word
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap32.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap32.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap32.c	(revision 33985)
@@ -16,6 +16,6 @@
   int I_start, J_start;
   int dropback, inDX, inDY;
-  int dx, dy, DX, DY;
-  double expand, Ix, Iy;
+  int dx, dy, DX;
+  double Ix, Iy;
   int expand_in, expand_out;
   OUT_TYPE *out_pix, *out_pix2, *data;
@@ -52,12 +52,10 @@
   if (picture[0].expand == -1) picture[0].expand = 1;
   assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (picture[0].expand > 0) {
-    expand = 1 / (1.0*picture[0].expand);
     expand_out = picture[0].expand;
     expand_in  = 1;
   }
   if (picture[0].expand < 0) {
-    expand = fabs((double)picture[0].expand);
     expand_out = 1;
     expand_in  = -picture[0].expand;
@@ -68,5 +66,5 @@
   dy = picture[0].dy;
   DX = matrix[0].Naxis[0];
-  DY = matrix[0].Naxis[1];
+  // int DY = matrix[0].Naxis[1];
 
   // i_start, j_start are the closest lit screen pixel to 0,0
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap8.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap8.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/Remap8.c	(revision 33985)
@@ -8,6 +8,6 @@
   int I_start, J_start;
   int dropback, inDX, inDY;
-  int dx, dy, DX, DY;
-  double expand, Ix, Iy;
+  int dx, dy, DX;
+  double Ix, Iy;
   int expand_in, expand_out;
   OUT_TYPE *out_pix, *out_pix2, *data;
@@ -32,14 +32,12 @@
   if (picture[0].expand == -1) picture[0].expand = 1;
   assert ((picture[0].expand >= 1) || (picture[0].expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (picture[0].expand == 0) /* set up expansions */
     picture[0].expand = 1;
   if (picture[0].expand > 0) {
-    expand = 1 / (1.0*picture[0].expand);
     expand_out = picture[0].expand;
     expand_in  = 1;
   }
   if (picture[0].expand < 0) {
-    expand = fabs((double)picture[0].expand);
     expand_out = 1;
     expand_in  = -picture[0].expand;
@@ -50,5 +48,5 @@
   dy = picture[0].dy;
   DX = matrix[0].Naxis[0];
-  DY = matrix[0].Naxis[1];
+  // int DY = matrix[0].Naxis[1];
 
   // i_start, j_start are the closest lit screen pixel to 0,0
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/SetGraphSize.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/SetGraphSize.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/SetGraphSize.c	(revision 33985)
@@ -77,5 +77,5 @@
   double minPADx, maxPADx, minPADy;
   double minPAD, maxPAD;
-  char string[64], *fontname;
+  char string[64];
   KapaGraphWidget *graph;
   Graphic *graphic;
@@ -97,5 +97,6 @@
 
   graphic = GetGraphic ();
-  fontname = GetRotFont (&fontsize);
+  // char *fontname;
+  GetRotFont (&fontsize);
 
   minPAD = 1.0*fontsize + 0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/SetImageData.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/SetImageData.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/SetImageData.c	(revision 33985)
@@ -3,9 +3,9 @@
 int SetImageData (int sock) {
   
-  Graphic *graphic;
   Section *section;
   KapaImageWidget *image;
 
-  graphic = GetGraphic();
+  // XXX needed for XClearWindow below 
+  // Graphic *graphic = GetGraphic();
 
   section = GetActiveSection();
@@ -53,9 +53,6 @@
 int SetImageCoords (int sock) {
   
-  Graphic *graphic;
   Section *section;
   KapaImageWidget *image;
-
-  graphic = GetGraphic();
 
   section = GetActiveSection();
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawFrame.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawFrame.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawFrame.c	(revision 33985)
@@ -60,5 +60,5 @@
   int pos, dir, fontsize;
   double size, n, pad;
-  char string[64], *fontname;
+  char string[64];
 
   double fx  = axis->fx;
@@ -93,5 +93,6 @@
     int xt, yt;
 
-    fontname = GetRotFont (&fontsize);
+    // char *fontname is returned but ignored
+    GetRotFont (&fontsize);
 
     pad = !isnan(axis->ticktextPad) ? axis->ticktextPad*fontsize : 0.8*fontsize + 1.0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawImage.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawImage.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawImage.c	(revision 33985)
@@ -11,8 +11,8 @@
   int i_start, i_end, j_start, j_end;
   int I_start, J_start;
-  int dropback;  /* this is a bit of a kludge... */
-  int dx, dy, DX, DY, inDX, inDY, Xs, Ys;
+  // int dropback;  /* this is a bit of a kludge... */
+  int dx, dy, DX, inDX, inDY, Xs, Ys;
   int expand_in, expand_out;
-  double expand, Ix, Iy;
+  double Ix, Iy;
   unsigned char *out_pix;
   unsigned short *in_pix, *in_pix_ref;
@@ -35,12 +35,10 @@
 
   assert ((image[0].picture.expand >= 1) || (image[0].picture.expand <= -2));
-  expand = expand_in = expand_out = 1.0;
+  expand_in = expand_out = 1.0;
   if (image[0].picture.expand > 0) {
-    expand = 1 / (1.0*image[0].picture.expand);
     expand_out = image[0].picture.expand;
     expand_in  = 1;
   }
   if (image[0].picture.expand < 0) {
-    expand = fabs((double)image[0].picture.expand);
     expand_out = 1;
     expand_in  = -image[0].picture.expand;
@@ -53,5 +51,5 @@
   dy = image[0].picture.dy;
   DX = image[0].image[0].matrix.Naxis[0];
-  DY = image[0].image[0].matrix.Naxis[1];
+  // int DY = image[0].image[0].matrix.Naxis[1];
 
   // the created buffer is supposed to contain the output windows
@@ -82,6 +80,6 @@
   inDY = image[0].picture.flipy ? -1 : +1;
 
-  dropback = expand_out - (i_end - i_start) % expand_out;
-  if ((i_end - i_start) % expand_out == 0) dropback = 0;
+  // dropback = expand_out - (i_end - i_start) % expand_out;
+  // if ((i_end - i_start) % expand_out == 0) dropback = 0;
 
   ALLOCATE (line_buffer, bDrawColor, 3*dx);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawOverlay.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawOverlay.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/kapa2/src/bDrawOverlay.c	(revision 33985)
@@ -8,5 +8,5 @@
   int i;
   int dx, dy;
-  int Xmin, Ymin, Xmax, Ymax, Xrange, Yrange;
+  int Xmin, Ymin, Xmax, Ymax;
   double expand, X, Y, dX, dY, pX, pY;
   bDrawColor color;
@@ -28,6 +28,4 @@
   Xmax = image[0].picture.dx;
   Ymax = image[0].picture.dy;
-  Xrange = image[0].picture.dx;
-  Yrange = image[0].picture.dy;
 
   if (N == INFRONT) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/misc/src/mkgauss.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/misc/src/mkgauss.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/misc/src/mkgauss.c	(revision 33985)
@@ -38,5 +38,4 @@
   long A, B;
   double val, x, dx, dx1, dx2, dx3, df;
-  double mean, sigma;
 
   A = time(NULL);
@@ -49,6 +48,4 @@
   dx2 = 2.0*dx/3.0;
   dx3 = dx;
-  mean = 0.0;
-  sigma = 1.0;
 
   for (i = 0, x = -7.0; (i < NGAUSS) && (x < 7.0); x += dx)  {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/mosastro/src/clip.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/mosastro/src/clip.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/mosastro/src/clip.c	(revision 33985)
@@ -5,9 +5,10 @@
   int i, j, Nscatter, Nmask, Nkeep, Nkpcp;
   double DL, DM, dL, dM;
-  double sigma;
   StarData *raw, *ref;
 
   Nmask = Nkeep = 0;
-  sigma = GetScatter (&Nscatter, &DL, &DM, FALSE);
+
+  // double sigma is returned;
+  GetScatter (&Nscatter, &DL, &DM, FALSE);
 
   for (i = 0; i < Nchip; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/mosastro/src/getusnob.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/mosastro/src/getusnob.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/mosastro/src/getusnob.c	(revision 33985)
@@ -133,5 +133,5 @@
       }
       
-      stars[Nusno].M = mB;
+      stars[Nusno].M = (TRUE) ? mB : mR;
       stars[Nusno].R += uR*(Year - 2000.0);
       stars[Nusno].D += uD*(Year - 2000.0);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/cdot.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/cdot.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/cdot.c	(revision 33985)
@@ -30,5 +30,6 @@
 
   status = fRD_to_XY (&x, &y, r, d, &graphmode.coords);
-
+  if (!status) return TRUE;
+  
   if (!KapaPrepPlot (kapa, 1, &graphmode)) return (FALSE);
   KapaPlotVector (kapa, 1, &x, "x");
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/cline.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/cline.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/cline.c	(revision 33985)
@@ -23,6 +23,13 @@
   graphmode.etype = 0;
 
+  // need to plot to edge of picture..
   status = fRD_to_XY (&x[0], &y[0], r[0], d[0], &graphmode.coords);
+  if (!status) {
+    return FALSE;
+  }
   status = fRD_to_XY (&x[1], &y[1], r[1], d[1], &graphmode.coords);
+  if (!status) {
+    return FALSE;
+  }
   
   if (!KapaPrepPlot (kapa, 2, &graphmode)) return (FALSE);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/fixcols.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/fixcols.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/fixcols.c	(revision 33985)
@@ -68,5 +68,5 @@
 int fixcols (int argc, char **argv) {
   
-  int ix, iy, Nx, Ny, Nvect, start, stop;
+  int ix, iy, Nx, Nvect, start, stop;
   float *Vin, *vect, *meds, median, stdev, sigma, Nsigma, value;
   Buffer *in;
@@ -84,5 +84,5 @@
 
   Nx = in[0].matrix.Naxis[0];
-  Ny = in[0].matrix.Naxis[1];
+  // Ny = in[0].matrix.Naxis[1];
 
   ALLOCATE (meds, float, Nx);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/fiximage.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/fiximage.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/fiximage.c	(revision 33985)
@@ -3,12 +3,12 @@
 int fiximage (int argc, char **argv) {
 
-  int ix, iy, N;
+  int ix, iy;
   Buffer *in, *ct, *mask;
 
-  int VERBOSE = FALSE;
-  if ((N = get_argument (argc, argv, "-v"))) {
-    VERBOSE = TRUE;
-    remove_argument (N, &argc, argv);
-  }
+  // int VERBOSE = FALSE;
+  // if ((N = get_argument (argc, argv, "-v"))) {
+  //   VERBOSE = TRUE;
+  //   remove_argument (N, &argc, argv);
+  // }
 
   if (argc != 4) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/gauss.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/gauss.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/gauss.c	(revision 33985)
@@ -5,5 +5,5 @@
   char key[20];
   int i, N, Npix, Nborder, Nspot;
-  double X, Y, Z, ZP, RA, DEC, max;
+  double X, Y, ZP, RA, DEC, max;
   int kapa;
   char *name;
@@ -58,5 +58,5 @@
     KiiCursorRead (kapa, &X, &Y, &ZP, &RA, &DEC, key);
     if (!strcasecmp (key, "Q")) break;
-    Z = get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);
+    get_aperture_stats (&buf[0].matrix, (int)(X+0.5), (int)(Y+0.5), Npix, Nborder, max);
   }
   KiiCursorOff (kapa);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/getvel.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/getvel.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/getvel.c	(revision 33985)
@@ -4,5 +4,4 @@
   
   int i, n, Ncurve;
-  int nx, ny;
   double L, V, Vo, dV, Bo, dB;
   double xo, yo;
@@ -29,6 +28,6 @@
 
   if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);
-  nx = buf[0].matrix.Naxis[0];
-  ny = buf[0].matrix.Naxis[1];
+  // int nx = buf[0].matrix.Naxis[0];
+  // int ny = buf[0].matrix.Naxis[1];
 
   /* we expect the input image to have units of velocity, lattitude, and longitude */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/imfit.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/imfit.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/imfit.c	(revision 33985)
@@ -3,5 +3,5 @@
 int imfit (int argc, char **argv) {
 
-  int i, j, N, Npts, Save, VERBOSE, ShapeVariation;
+  int i, j, N, Npts, Save, VERBOSE;
   int sx, sy, nx, ny, Nx, Ny;
   float chisq, ochisq, dchisq, Gain, RDnoise, SatThreshold;
@@ -16,9 +16,9 @@
   }
 
-  ShapeVariation = FALSE;
-  if ((N = get_argument (argc, argv, "-shapes"))) {
-    remove_argument (N, &argc, argv);
-    ShapeVariation = TRUE;
-  }
+  // int ShapeVariation = FALSE;
+  // if ((N = get_argument (argc, argv, "-shapes"))) {
+  //   remove_argument (N, &argc, argv);
+  //   ShapeVariation = TRUE;
+  // }
 
   SatThreshold = 0xffff;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/imsub.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/imsub.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/imsub.c	(revision 33985)
@@ -3,5 +3,5 @@
 int imsub (int argc, char **argv) {
 
-  int i, j, N, VERBOSE;
+  int i, j, N;
   int sx, sy, nx, ny, Nx, Ny;
   float value;
@@ -9,9 +9,9 @@
   Buffer *buf;
 
-  VERBOSE = FALSE;
-  if ((N = get_argument (argc, argv, "-v"))) {
-    remove_argument (N, &argc, argv);
-    VERBOSE = TRUE;
-  }
+  // int VERBOSE = FALSE;
+  // if ((N = get_argument (argc, argv, "-v"))) {
+  //   remove_argument (N, &argc, argv);
+  //   VERBOSE = TRUE;
+  // }
 
   /* set fitting function */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/kronflux.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/kronflux.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/kronflux.c	(revision 33985)
@@ -67,12 +67,12 @@
   int i, j;
 
-  double gain;
-  char *string = get_variable ("GAIN");
-  if (string == (char *) NULL) {
-    if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n");
-    gain = 1.0;
-  } else {
-    gain = atof (string);
-  }
+  // double gain;
+  // char *string = get_variable ("GAIN");
+  // if (string == (char *) NULL) {
+  //   if (VERBOSE) gprint (GP_ERR, "assuming a value of 1.0\n");
+  //   gain = 1.0;
+  // } else {
+  //   gain = atof (string);
+  // }
 
   float *data = (float *) matrix->buffer;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/medianmap.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/medianmap.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/medianmap.c	(revision 33985)
@@ -6,5 +6,5 @@
   int i, j, k, I0, I1, J0, J1, I, J, n, N;
   int nx, ny, Nx, Ny, NX, NY, Ignore;
-  float Mv, Nv, Mv2, value, min, max, IgnoreValue;
+  float value, min, max, IgnoreValue;
   float *In, *Out, *ip;
   float fx, fy;
@@ -71,5 +71,5 @@
   ALLOCATE (temp, float, 2*nx*ny);
 
-  Nv = Mv = Mv2 = 0.0;
+  // float Mv = Mv2 = 0.0;
 
   for (j = 0; j < Ny; j++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/objload.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/objload.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/objload.c	(revision 33985)
@@ -52,5 +52,7 @@
     for (i = 0; i < Nline; i++) {
       /* we are now using all entries on the *.obj line */
-      status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f",  &type, &overlay[Noverlay].x, &overlay[Noverlay].y);
+      status = sscanf (&buffer[i*CHAR_LINE], "%d %f %f",  &type, &overlay[Noverlay].x, &
+overlay[Noverlay].y);
+      if (status != 3) continue;
       if (Objtype && (Objtype != type)) continue;
       overlay[Noverlay].type = KII_OVERLAY_BOX;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/outline.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/outline.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/outline.c	(revision 33985)
@@ -8,5 +8,5 @@
 int outline (int argc, char **argv) {
   
-  int i, j, k, Npar, BigChange, ABigChange;
+  int i, j, k, BigChange, ABigChange;
   float Io, *in, ochisq, dchi, chisq, chisq_p, chisq_m, dp, tmp_par;
   float curve, frac;
@@ -14,5 +14,5 @@
 
   if (argc != 9) {
-    gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer) Npar\n");
+    gprint (GP_ERR, "USAGE: outline x y dx dy dxy Io (buffer)\n");
     return (FALSE);
   }
@@ -26,5 +26,5 @@
   par[4] = atof(argv[5]);
   Io = atof(argv[6]);
-  Npar = atof (argv[8]);
+  // int Npar = atof (argv[8]);
 
   dpar[0] = 10;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/rotcurve.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/rotcurve.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/rotcurve.c	(revision 33985)
@@ -8,5 +8,5 @@
   double L, dL, Lo, V, Vo, dV, Bo, dB, Do, dD;
   double xo, yo, Xo, Yo;
-  double sl, cl, wo, Ro, Rs, wr, r, fr, d, min;
+  double sl, cl, wo, Ro, Rs, wr, r, d, min;
   double R[100], T[100], W[100];
   FILE *f;
@@ -99,5 +99,5 @@
       }
       r = (wr - W[n]) *  (R[n-1] - R[n]) / (W[n-1] - W[n]) + R[n];
-      fr = (Ro/r);
+      // fr = (Ro/r);
       if (r < fabs(Rs)) { /* can't be on rotation curve */
 	continue;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/spec.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/spec.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/spec.c	(revision 33985)
@@ -3,5 +3,5 @@
 int spec (int argc, char **argv) {
 
-  int i, j, Xo, X1, y1, y2, Nx, Ny;
+  int i, j, Xo, X1, y1, y2, Nx;
   int Nlong, Ngap, Nrow, N, Nring;
   float *buffer, *V;
@@ -45,5 +45,5 @@
   if ((buf = SelectBuffer (argv[1], OLDBUFFER, TRUE)) == NULL) return (FALSE);
   Nx = buf[0].matrix.Naxis[0];
-  Ny = buf[0].matrix.Naxis[1];
+  // int Ny = buf[0].matrix.Naxis[1];
 
   Xo = atof (argv[2]);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/star.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/star.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/star.c	(revision 33985)
@@ -4,5 +4,5 @@
 
   int x, y, N, dx, Nborder;
-  double Z, max;
+  double max;
   Buffer *buf;
 
@@ -36,5 +36,5 @@
   }
 
-  Z = get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);
+  get_aperture_stats (&buf[0].matrix, x, y, dx, Nborder, max);
   
   return (TRUE);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/transform.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/transform.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.astro/transform.c	(revision 33985)
@@ -5,5 +5,4 @@
   int i, j, Nx, Ny;
   Coords coords_in, coords_out;
-  double scale_in, scale_out;
   int X, Y;
   double x, y, r, d, dx, dy;
@@ -30,6 +29,6 @@
   }
   
-  scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1)));
-  scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1)));
+  // double scale_in = sqrt(fabs(coords_in.cdelt1*coords_in.cdelt2*(coords_in.pc1_1*coords_in.pc2_2 - coords_in.pc1_2*coords_in.pc2_1)));
+  // double scale_out = sqrt(fabs(coords_out.cdelt1*coords_out.cdelt2*(coords_out.pc1_1*coords_out.pc2_2 - coords_out.pc1_2*coords_out.pc2_1)));
 
   Vin  = (float *) in[0].matrix.buffer;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/densify.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/densify.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/densify.c	(revision 33985)
@@ -5,5 +5,5 @@
 int densify (int argc, char **argv) {
 
-  int i, Nx, Ny, Xb, Yb, Normalize, N, Xpix, Ypix, good, UseGraph;
+  int i, Nx, Ny, Xb, Yb, N, Xpix, Ypix, good, UseGraph;
   double Xmin, Xmax, dX, Ymin, Ymax, dY;
   float *val;
@@ -12,9 +12,9 @@
   opihi_flt *x, *y;
 
-  Normalize = TRUE;
-  if ((N = get_argument (argc, argv, "-raw"))) {
-    remove_argument (N, &argc, argv);
-    Normalize = FALSE;
-  }
+  // int Normalize = TRUE;
+  // if ((N = get_argument (argc, argv, "-raw"))) {
+  //   remove_argument (N, &argc, argv);
+  //   Normalize = FALSE;
+  // }
 
   UseGraph = FALSE;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/gaussdeviate.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/gaussdeviate.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/gaussdeviate.c	(revision 33985)
@@ -34,5 +34,4 @@
   
   int i, Npts;
-  double mean, sigma;
   Vector *vec;
 
@@ -42,6 +41,6 @@
 
   Npts = atoi (argv[2]);
-  mean = atof (argv[3]);
-  sigma = atof (argv[4]);
+  // mean = atof (argv[3]);
+  // sigma = atof (argv[4]);
 
   ResetVector (vec, OPIHI_FLT, Npts);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/list_header.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/list_header.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/list_header.c	(revision 33985)
@@ -41,5 +41,10 @@
     strcpy (buf[0].file, "*");
     strcat (buf[0].file, filename);
+
     status = gfits_read_header (argv[2], &buf[0].header);
+    if (!status) {
+      gprint (GP_ERR, "failed to read header for %s\n", argv[2]);
+      return FALSE;
+    }
     buf[0].header.bitpix = bitpix;     
     buf[0].header.bzero  = bzero;      
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/load.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/load.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/load.c	(revision 33985)
@@ -3,5 +3,5 @@
 int load (int argc, char **argv) {
   
-  int i, N, n, ISCEL;
+  int i, N, ISCEL;
   int kapa, Noverlay, NOVERLAY;
   char *c, type[10], string[128], line[1024];
@@ -59,5 +59,5 @@
 
   dx = dy = 0;
-  for (n = 0; scan_line (f, line) != EOF;) {
+  while (scan_line (f, line) != EOF) {
     c = strchr (line, '#');
     if (c != (char *) NULL) 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/lookup.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/lookup.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/lookup.c	(revision 33985)
@@ -37,5 +37,5 @@
 
     for (j = 0; (*ip < *xp) && (j < yv[0].Nelements); j++);
-    *op = j;
+    *op = *yp;
   }      
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/rotate.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/rotate.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/rotate.c	(revision 33985)
@@ -3,5 +3,5 @@
 int rotate (int argc, char **argv) {
   
-  int i, j, NX, NY, X, Y, Lx, Ly, N, newCenter;
+  int i, j, NX, NY, X, Y, Lx, Ly, N;
   float *in_buff, *out_buff, *c;
   double angle, CosAngle, SinAngle, Xo, Yo, dX, dY, fx, fy, x, y, X1, Y1;
@@ -12,5 +12,4 @@
   Yo = 0;
   if ((N = get_argument (argc, argv, "-center"))) {
-    newCenter = TRUE;
     remove_argument (N, &argc, argv);
     Xo  = atof(argv[N]);
@@ -19,6 +18,4 @@
     remove_argument (N, &argc, argv);
   }
-  else 
-    newCenter  = FALSE;
 
   if (argc != 3) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/shift.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/shift.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/shift.c	(revision 33985)
@@ -3,5 +3,5 @@
 int shift (int argc, char **argv) {
  
-  int i, j, N, ROLL;
+  int i, j;
   int nx, ny, dx, dy, DXin, DXot, DYin, DYot;
   float *Vin, *Vot;
@@ -9,9 +9,9 @@
   Buffer *in, *out;
 
-  ROLL = FALSE;
-  if ((N = get_argument (argc, argv, "-roll"))) {
-    remove_argument (N, &argc, argv);
-    ROLL = TRUE;
-  }
+  // int ROLL = FALSE;
+  // if ((N = get_argument (argc, argv, "-roll"))) {
+  //   remove_argument (N, &argc, argv);
+  //   ROLL = TRUE;
+  // }
 
   if (argc != 5) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/spline_apply.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/spline_apply.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/spline_apply.c	(revision 33985)
@@ -5,5 +5,5 @@
   
   int i, j, I, J;
-  int nx, ny, Nx, Ny, xdir;
+  int nx, ny, Nx, Ny;
   float rx, ry, x, y;
   float *Tx1, *Tx2, *Txc, *Ty1, *Ty2, *Tyc, *V, *V1, *V2;
@@ -19,6 +19,6 @@
   if ((out = SelectBuffer (argv[3], ANYBUFFER, TRUE)) == NULL) return (FALSE);
 
-  xdir = FALSE;
-  if (!strcmp (argv[4], "x")) xdir = TRUE; 
+  // xdir = FALSE;
+  // if (!strcmp (argv[4], "x")) xdir = TRUE; 
 
   nx = atoi (argv[5]);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/spline_construct.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/spline_construct.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/cmd.data/spline_construct.c	(revision 33985)
@@ -4,5 +4,5 @@
 int spline_construct_cmd (int argc, char **argv) {
   
-  int i, j, Nx, Ny, xdir;
+  int i, j, Nx, Ny;
   float *Tx, *Ty, *Ty2, *V;
   Buffer *in, *out;
@@ -31,6 +31,6 @@
   gfits_create_matrix (&out[0].header, &out[0].matrix);
 
-  xdir = FALSE;
-  if (!strcmp (argv[3], "x")) xdir = TRUE; 
+  // int xdir = FALSE;
+  // if (!strcmp (argv[3], "x")) xdir = TRUE; 
   /* ideally, the resulting image should carry this info (in header?) */
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/avextract.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/avextract.c	(revision 33985)
@@ -5,5 +5,5 @@
   off_t i, j, n, m;
   int N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
-  int Nsecfilt, mode, VERBOSE, needMeasures;
+  int Nsecfilt, VERBOSE, needMeasures;
   char **cstack, name[1024];
   void *Signal;
@@ -25,6 +25,4 @@
   skylist = NULL;
   selection = NULL;
-
-  mode = MAG_AVE;
 
   if ((N = get_argument (argc, argv, "-h"))) goto help;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/calextract.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/calextract.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/calextract.c	(revision 33985)
@@ -6,5 +6,5 @@
   
   off_t i, Nr;
-  int Nsecfilt, NSTAR, N, mode[2];
+  int N, mode[2];
 
   PhotCode *code[2];
@@ -24,5 +24,4 @@
   /* load photcode information */
   if (!InitPhotcodes ()) return (FALSE);
-  Nsecfilt = GetPhotcodeNsecfilt ();
 
   /* command line arguments */
@@ -41,5 +40,4 @@
   /* one unique value per star */
   N = 0;
-  NSTAR = 1;
   ALLOCATE (vec, Vector *, NVEC);
   if ((vec[Nd] 	= SelectVector ("cal:dmag",     ANYVECTOR, TRUE)) == NULL) goto escape;
@@ -74,4 +72,6 @@
 
     # if (0)
+    int NSTAR = 1;
+    int Nsecfilt = GetPhotcodeNsecfilt ();
     /* extract values, assign to vectors */
     for (i = 0; i < catalog.Naverage; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/calmextract.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/calmextract.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/calmextract.c	(revision 33985)
@@ -7,5 +7,5 @@
   
   off_t i, k, Nr;
-  int NSTAR, Nstar, Nsecfilt, N, mode[2];
+  int NSTAR, N, mode[2];
 
   Catalog catalog;
@@ -25,5 +25,4 @@
   /* load photcode information */
   if (!InitPhotcodes ()) goto escape;
-  Nsecfilt = GetPhotcodeNsecfilt ();
 
   /* command line arguments */
@@ -61,5 +60,4 @@
 
   N = 0;
-  Nstar = 0;
   NSTAR = 100;
   for (k = 0; k < NVEC; k++) {
@@ -87,4 +85,7 @@
 
     # if (0)
+    int Nstar = 0;
+    int Nsecfilt = GetPhotcodeNsecfilt ();
+
     /* extract values, assign to vectors */
     for (i = 0; i < catalog.Naverage; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/ccd.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/ccd.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/ccd.c	(revision 33985)
@@ -8,5 +8,4 @@
   int mode[4];
   int Nsecfilt, KeepNulls;
-  void *Signal;
 
   Catalog catalog;
@@ -63,5 +62,5 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/cmpload.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/cmpload.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/cmpload.c	(revision 33985)
@@ -6,5 +6,5 @@
 int cmpload (int argc, char **argv) {
   
-  int i, Noverlay, NOVERLAY, Nstar, N, Nin, Nextra, Objtype, type;
+  int i, Noverlay, NOVERLAY, Nstar, N, Nextra, Objtype, type;
   int doneread, done, Nskip, Nbytes, nbytes, Ninstar;
   char *c, *c2, *name;
@@ -63,5 +63,4 @@
   
   /* load in stars by blocks of 1000 */
-  Nin = 0;
   ALLOCATE (buffer, char, (BLOCK*BYTES_STAR) + 1);
   buffer[BLOCK*BYTES_STAR] = 0;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/fitsed.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/fitsed.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/fitsed.c	(revision 33985)
@@ -26,5 +26,5 @@
   off_t i, j, k, m;
   int N, done, Nfit;
-  int Nsecfilt, status;
+  int status;
   void *oldsignal;
   char name[64], line[1024], key[20];
@@ -41,5 +41,5 @@
   KapaSection magSection, resSection;
 
-  Catalog catalog, outcat;
+  Catalog catalog;
   SkyList *skylist;
   SkyRegionSelection *selection;
@@ -57,7 +57,7 @@
   catalog.secfilt = NULL;
 
-  outcat.average = NULL;
-  outcat.measure = NULL;
-  outcat.secfilt = NULL;
+  // outcat.average = NULL;
+  // outcat.measure = NULL;
+  // outcat.secfilt = NULL;
 
   SEDtable = NULL;
@@ -80,5 +80,5 @@
   /* load photcode information */
   if (!InitPhotcodes ()) goto escape;
-  Nsecfilt = GetPhotcodeNsecfilt ();
+  int Nsecfilt = GetPhotcodeNsecfilt ();
 
   /* interpret command-line options */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/gcat.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/gcat.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/gcat.c	(revision 33985)
@@ -8,5 +8,4 @@
   SkyTable *sky;
   SkyList *skylist;
-  void *Signal;
 
   int ShowHost = FALSE;
@@ -43,5 +42,5 @@
 
   // prepare to handle interrupt signals
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/images.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/images.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/images.c	(revision 33985)
@@ -13,5 +13,5 @@
   off_t i, Nimage, Nmosaic;
   int j, status, InPic, leftside, *plist, TimeSelect, ByName;
-  int WITH_MOSAIC, SOLO_MOSAIC, HIDDEN;
+  int WITH_MOSAIC, SOLO_MOSAIC;
   time_t tzero, tend;
   int N, NPTS, n, npts, Npts, kapa, *foundMosaic;
@@ -42,9 +42,9 @@
   }
 
-  HIDDEN = FALSE;
-  if ((N = get_argument (argc, argv, "-hidden"))) {
-    remove_argument (N, &argc, argv);
-    HIDDEN = TRUE;
-  }
+  // int HIDDEN = FALSE;
+  // if ((N = get_argument (argc, argv, "-hidden"))) {
+  //   remove_argument (N, &argc, argv);
+  //   HIDDEN = TRUE;
+  // }
 
   photcode = NULL;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imdata.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imdata.c	(revision 33985)
@@ -15,5 +15,4 @@
   Vector *vec;
   SkyRegionSelection *selection;
-  void *Signal;
 
   // parse skyregion options
@@ -130,5 +129,5 @@
 
   // prepare to handle interrupt signals
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imextract.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imextract.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imextract.c	(revision 33985)
@@ -5,5 +5,4 @@
   off_t i, j, Nimage;
   int n, N, Npts, NPTS, last, next, state, Nfields, Nreturn, Ncstack, Nstack;
-  int VERBOSE;
   char **cstack, name[1024];
   void *Signal;
@@ -27,9 +26,9 @@
   if ((N = get_argument (argc, argv, "--help"))) goto help;
 
-  VERBOSE = FALSE;
-  if ((N = get_argument (argc, argv, "-v"))) {
-    remove_argument (N, &argc, argv);
-    VERBOSE = TRUE;
-  }
+  // int VERBOSE = FALSE;
+  // if ((N = get_argument (argc, argv, "-v"))) {
+  //   remove_argument (N, &argc, argv);
+  //   VERBOSE = TRUE;
+  // }
 
   if (!InitPhotcodes ()) goto escape;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imlist.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imlist.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imlist.c	(revision 33985)
@@ -4,5 +4,5 @@
   
   off_t i, j, Nimage, *subset, Nsubset;
-  int N, TimeSelect, RegionSelect, TimeFormat, NameSelect;
+  int N, TimeSelect, TimeFormat, NameSelect;
   int PhotcodeSelect;
   time_t tzero, TimeReference;
@@ -38,9 +38,9 @@
   }
 
-  RegionSelect = FALSE;
-  if ((N = get_argument (argc, argv, "-region"))) {
-    remove_argument (N, &argc, argv);
-    RegionSelect = TRUE;
-  }
+  // int RegionSelect = FALSE;
+  // if ((N = get_argument (argc, argv, "-region"))) {
+  //   remove_argument (N, &argc, argv);
+  //   RegionSelect = TRUE;
+  // }
 
   PhotcodeValue = NULL;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imphot.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imphot.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/imphot.c	(revision 33985)
@@ -9,5 +9,5 @@
   char bufname[64];
   float *p;
-  double fx, fy, x, y;
+  double x, y;
   Image *image;
   Buffer *buf;
@@ -58,6 +58,6 @@
 
   if (GreyScale && Nsubset) {
-    fx = image[subset[0]].NX / 100;
-    fy = image[subset[0]].NY / 200;
+    // double fx = image[subset[0]].NX / 100;
+    // double fy = image[subset[0]].NY / 200;
     p = (float *) buf[0].matrix.buffer;
     for (y = 0; y < 200; y+=1.0) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/lcurve.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/lcurve.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/lcurve.c	(revision 33985)
@@ -7,5 +7,5 @@
   double *RA, *DEC;
   int kapa, TimeFormat;
-  int found, AutoLimits, ErrorBars, GalMag, AbsPhot, SaveVectors;
+  int found, AutoLimits, ErrorBars, SaveVectors;
   off_t i, j, m, Nstars, *N1;
   int N, NPTS;
@@ -39,15 +39,15 @@
   }
 
-  AbsPhot = FALSE;
-  if ((N = get_argument (argc, argv, "-abs"))) {
-    remove_argument (N, &argc, argv);
-    AbsPhot = TRUE;
-  }
+  // int AbsPhot = FALSE;
+  // if ((N = get_argument (argc, argv, "-abs"))) {
+  //   remove_argument (N, &argc, argv);
+  //   AbsPhot = TRUE;
+  // }
 
-  GalMag = FALSE;
-  if ((N = get_argument (argc, argv, "-gal"))) {
-    gprint (GP_ERR, "galaxy magnitudes currently disabled\n");
-    return (FALSE);
-  }
+  // int GalMag = FALSE;
+  // if ((N = get_argument (argc, argv, "-gal"))) {
+  //   gprint (GP_ERR, "galaxy magnitudes currently disabled\n");
+  //   return (FALSE);
+  // }
 
   ErrorBars = FALSE;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/objectcoverage.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/objectcoverage.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/objectcoverage.c	(revision 33985)
@@ -5,9 +5,7 @@
 int objectcoverage (int argc, char **argv) {
 
-  void *Signal;
   int ShowDensity;
   int N, status, TimeSelect, xs, ys;
-  time_t tzero, tend;
-  double pixscale, r, d, Xs, Ys, trange, RaCenter, DecCenter;
+  double pixscale, r, d, Xs, Ys, RaCenter, DecCenter;
   char projection[16];
   float *V;
@@ -77,42 +75,44 @@
   }
 
-  TimeSelect = FALSE;
-  if ((N = get_argument (argc, argv, "-time"))) {
-    remove_argument (N, &argc, argv);
-    if (!ohana_str_to_time (argv[N], &tzero)) { 
-      gprint (GP_ERR, "syntax error\n");
-      return (FALSE);
-    }
-    remove_argument (N, &argc, argv);
-    if (!ohana_str_to_dtime (argv[N], &trange)) { 
-      gprint (GP_ERR, "syntax error\n");
-      return (FALSE);
-    }
-    remove_argument (N, &argc, argv);
-    if (trange < 0) {
-      trange = fabs (trange);
-      tzero -= trange;
-    }
-    TimeSelect = TRUE;
-  }
-  if ((N = get_argument (argc, argv, "-trange"))) {
-    remove_argument (N, &argc, argv);
-    if (!ohana_str_to_time (argv[N], &tzero)) { 
-      gprint (GP_ERR, "syntax error\n");
-      return (FALSE);
-    }
-    remove_argument (N, &argc, argv);
-    if (!ohana_str_to_time (argv[N], &tend)) { 
-      gprint (GP_ERR, "syntax error\n");
-      return (FALSE);
-    }
-    remove_argument (N, &argc, argv);
-    trange = tend - tzero;
-    if (trange < 0) {
-      trange = fabs (trange);
-      tzero -= trange;
-    }
-    TimeSelect = TRUE;
-  }
+  // double trange;
+  // time_t tzero, tend;
+  // int TimeSelect = FALSE;
+  // if ((N = get_argument (argc, argv, "-time"))) {
+  //   remove_argument (N, &argc, argv);
+  //   if (!ohana_str_to_time (argv[N], &tzero)) { 
+  //     gprint (GP_ERR, "syntax error\n");
+  //     return (FALSE);
+  //   }
+  //   remove_argument (N, &argc, argv);
+  //   if (!ohana_str_to_dtime (argv[N], &trange)) { 
+  //     gprint (GP_ERR, "syntax error\n");
+  //     return (FALSE);
+  //   }
+  //   remove_argument (N, &argc, argv);
+  //   if (trange < 0) {
+  //     trange = fabs (trange);
+  //     tzero -= trange;
+  //   }
+  //   TimeSelect = TRUE;
+  // }
+  // if ((N = get_argument (argc, argv, "-trange"))) {
+  //   remove_argument (N, &argc, argv);
+  //   if (!ohana_str_to_time (argv[N], &tzero)) { 
+  //     gprint (GP_ERR, "syntax error\n");
+  //     return (FALSE);
+  //   }
+  //   remove_argument (N, &argc, argv);
+  //   if (!ohana_str_to_time (argv[N], &tend)) { 
+  //     gprint (GP_ERR, "syntax error\n");
+  //     return (FALSE);
+  //   }
+  //   remove_argument (N, &argc, argv);
+  //   trange = tend - tzero;
+  //   if (trange < 0) {
+  //     trange = fabs (trange);
+  //     tzero -= trange;
+  //   }
+  //   TimeSelect = TRUE;
+  // }
  
   if (argc != 3) {
@@ -178,5 +178,5 @@
   Nsecfilt = GetPhotcodeNsecfilt();
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/paverage.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/paverage.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/paverage.c	(revision 33985)
@@ -4,5 +4,4 @@
 int paverage (int argc, char **argv) {
   
-  FILE *f;
   off_t i, j;
   int kapa, Narg, Npts, NPTS, status, VERBOSE;
@@ -12,5 +11,4 @@
   unsigned IDclip, IDchoice, LimExclude;
   float *Xvec, *Yvec, *Zvec;
-  void *Signal;
 
   PhotCode *photcode;
@@ -27,5 +25,4 @@
   if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE;
 
-  f = (FILE *) NULL;
   Mz = 17.0;
   Mr = -5.0;
@@ -102,5 +99,5 @@
 
   // prepare to handle interrupt signals
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/pmeasure.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/pmeasure.c	(revision 33985)
@@ -6,5 +6,4 @@
 int pmeasure (int argc, char **argv) {
   
-  FILE *f;
   off_t i, j, k, m;
   int kapa, Narg, Npts, NPTS, status, VERBOSE, TimeSelect, Nloaded;
@@ -17,5 +16,4 @@
   float *Xvec, *Yvec, *Zvec;
   time_t tzero, tend;
-  void *Signal;
 
   SkyTable *sky;
@@ -27,5 +25,4 @@
   if (!style_args (&graphmode, &argc, argv, &kapa)) return FALSE;
 
-  f = (FILE *) NULL;
   Mz = 17.0;
   Mr = -5.0;
@@ -175,5 +172,5 @@
 
   // prepare to handle interrupt signals
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/simage.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/simage.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/simage.c	(revision 33985)
@@ -12,5 +12,5 @@
   Header header;
   Coords coords;
-  int i, j, kapa, Nstars, nstars, Nbytes, nbytes, Npts, N;
+  int i, j, kapa, Nstars, nstars, Nbytes, nbytes, N;
   Graphdata graphmode;
 
@@ -150,5 +150,4 @@
   graphmode.size = -1;
   graphmode.etype = 0;
-  Npts = Xvec.Nelements;
 
   PlotVectorTriplet (kapa, &Xvec, &Yvec, &Zvec, &graphmode);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/skycat.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/skycat.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/dvo/skycat.c	(revision 33985)
@@ -14,5 +14,4 @@
   SkyList *skylist;
   SkyRegion **regions;
-  void *Signal;
 
   VERBOSE = FALSE;
@@ -62,5 +61,5 @@
 
   // prepare to handle interrupt signals
-  Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.data/starfuncs.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.data/starfuncs.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.data/starfuncs.c	(revision 33985)
@@ -125,5 +125,5 @@
 		    opihi_flt *zs, opihi_flt *zp, opihi_flt *sk) {
 
-  double Ra2, Ri2, Ro2, rad2;
+  double Ro2, rad2;
   int i, j, Npts, Nsky;
   int Xs, Xe, Ys, Ye, off, Xc, Yc;
@@ -132,6 +132,4 @@
   
   /* define circular boundaries */
-  Ra2 = SQ(Raper);
-  Ri2 = SQ(Rinner);
   Ro2 = SQ(Router);
 
@@ -145,4 +143,5 @@
 /* this sample uses a circular aperture */
 # if (0)
+  double Ri2 = SQ(Rinner);
   Nsky = 0;  
   for (j = Ys; j < Ye; j++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.data/svdcmp.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.data/svdcmp.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.data/svdcmp.c	(revision 33985)
@@ -14,5 +14,5 @@
 int svdcmp (float *a, opihi_flt *w, float *v, int Nx, int Ny) {
 
-  int flag, i, its, j, jj, k, l, nm, status;
+  int flag, i, its, j, jj, k, l, nm;
   float c, f, h, s, x, y, z;
   float anorm=0.0, g = 0.0, scale = 0.0;
@@ -111,5 +111,5 @@
   }
 
-  status = 1;
+  // int status = 1;
   for (k = Nx - 1; k >= 0; k--) {
     for (its = 0; its < 30; its++) {
@@ -152,5 +152,5 @@
 	break;
       }
-      if (its == 29) status = 0;
+      // if (its == 29) status = 0;
       x = w[l];
       nm = k-1;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/convert_to_RPN.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/convert_to_RPN.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/convert_to_RPN.c	(revision 33985)
@@ -4,5 +4,5 @@
 StackVar *convert_to_RPN (int argc, char **argv, int *nstack) {
   
-  int type, Nx, Ny;
+  int type;
   int i, j, Nstack, Nop_stack, NSTACK;
   StackVar *stack, *op_stack;
@@ -17,5 +17,5 @@
   }
   
-  Nx = Ny = Nstack = Nop_stack = 0;
+  Nstack = Nop_stack = 0;
   for (i = 0; i < argc; i++) {
     
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/evaluate_stack.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/evaluate_stack.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/evaluate_stack.c	(revision 33985)
@@ -12,8 +12,7 @@
 int evaluate_stack (StackVar *stack, int *Nstack) {
   
-  int i, j, Nvar, Nout, status;
+  int i, j, status;
   char line[512]; // this is only used to report an error
   StackVar tmp_stack;
-  Nout = Nvar = 0;
 
   status = TRUE;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/opihi.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/opihi.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/lib.shell/opihi.c	(revision 33985)
@@ -4,5 +4,5 @@
 int opihi (int argc, char **argv) {
 
-  int Nbad, status;
+  int Nbad;
   char *line, *prompt, *history;
   pid_t ppid;
@@ -39,5 +39,5 @@
     stripwhite (line);
     if (*line) {
-      status = multicommand (line);
+      multicommand (line);
       add_history (line);
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/ControllerOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 33985)
@@ -63,11 +63,10 @@
 int CheckControllerJob (Job *job) {
   struct timeval start, stop;
-  float dtime;
 
   gettimeofday (&start, (void *) NULL);
   CheckControllerJobStatus (job);
   gettimeofday (&stop, (void *) NULL);
-  dtime = DTIME (stop, start);
-  /* if (VerboseMode()) gprint (GP_ERR, "check job status %f\n", dtime); */
+  // float dtime = DTIME (stop, start);
+  // if (VerboseMode()) gprint (GP_ERR, "check job status %f\n", dtime);
 
   if ((job[0].state == JOB_EXIT) || (job[0].state == JOB_CRASH)) {
@@ -75,5 +74,5 @@
     GetJobOutput ("stdout", job[0].pid, &job[0].stdout_buff, job[0].stdout_size);
     gettimeofday (&stop, (void *) NULL);
-    dtime = DTIME (stop, start);
+    // float dtime = DTIME (stop, start);
     /* if (VerboseMode()) gprint (GP_ERR, "get stdout %f\n", dtime); */
 
@@ -81,5 +80,5 @@
     GetJobOutput ("stderr", job[0].pid, &job[0].stderr_buff, job[0].stderr_size);
     gettimeofday (&stop, (void *) NULL);
-    dtime = DTIME (stop, start);
+    // float dtime = DTIME (stop, start);
     /* if (VerboseMode()) gprint (GP_ERR, "get stderr %f\n", dtime); */
 
@@ -87,5 +86,5 @@
     DeleteControllerJob (job);
     gettimeofday (&stop, (void *) NULL);
-    dtime = DTIME (stop, start);
+    // float dtime = DTIME (stop, start);
     /* if (VerboseMode()) gprint (GP_ERR, "delete job %f\n", dtime); */
   }  
@@ -578,5 +577,4 @@
 int QuitController () {
 
-  int status;
   char cmd[128];
   IOBuffer buffer;
@@ -586,5 +584,5 @@
   sprintf (cmd, "quit");
   InitIOBuffer (&buffer, 0x100);
-  status = ControllerCommand (cmd, NULL, &buffer);
+  ControllerCommand (cmd, NULL, &buffer);
   FreeIOBuffer (&buffer);
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/client_shell.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/client_shell.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/client_shell.c	(revision 33985)
@@ -4,5 +4,5 @@
 int client_shell (int argc, char **argv) {
 
-  int Nbad, status;
+  int Nbad;
   char *line, *prompt, *history;
   pid_t ppid;
@@ -41,5 +41,6 @@
 
     if (*line) {
-	status = multicommand (line);
+      // status = multicommand (line); do something different if false?
+	multicommand (line);
 	add_history (line);
 	append_history (1, history);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/task.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/task.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pantasks/task.c	(revision 33985)
@@ -5,5 +5,5 @@
 
   int hash;
-  int ThisList, status;
+  int ThisList;
   char *input, *outline;
   Task *task;
@@ -82,8 +82,7 @@
       case TASK_NPENDING:
       case TASK_ACTIVE:
-	status = command (input, &outline, TRUE);
+	// status = command(); do something with this info?
+	command (input, &outline, TRUE);
 	if (outline != NULL) free (outline);
-	/* what to do if command is invalid?
-	   if (!status) return (FALSE); */
 	break;
 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pcontrol/CheckHost.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pcontrol/CheckHost.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pcontrol/CheckHost.c	(revision 33985)
@@ -40,9 +40,6 @@
 int CheckHostResponse (Host *host) {
   
-  IOBuffer *buffer;
-
   /* we only check IDLE hosts without jobs */
   ASSERT (host, "missing host");
-  buffer = &host[0].comms_buffer;
 
   // XXX check on the value of the response? (OK)
Index: /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pcontrol/CheckSystem.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pcontrol/CheckSystem.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/opihi/pcontrol/CheckSystem.c	(revision 33985)
@@ -62,7 +62,5 @@
 void *CheckSystem_Threaded (void *data) {
 
-  int Njobchecks, Nhostchecks, Nlivechecks, Ndonejobs;
-
-  Nlivechecks = 0;
+  int Njobchecks, Nhostchecks, Ndonejobs;
 
   gprintInit ();
Index: /branches/eam_branches/ipp-20120601/Ohana/src/photdbc/src/CopyBackupToHost.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/photdbc/src/CopyBackupToHost.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/photdbc/src/CopyBackupToHost.c	(revision 33985)
@@ -22,9 +22,8 @@
   // get the IDs for the src and dst machines
   int srcID = 0;
-  int srcIndex = 0;
   int dstID = 0;
   int dstIndex = 0;
   for (i = 0; i < table->Nhosts; i++) {
-    if (!strcmp (table->hosts[i].hostname, srcHostname)) { srcID = table->hosts[i].hostID; srcIndex = i; }
+    if (!strcmp (table->hosts[i].hostname, srcHostname)) { srcID = table->hosts[i].hostID; }
     if (!strcmp (table->hosts[i].hostname, dstHostname)) { dstID = table->hosts[i].hostID; dstIndex = i; }
   }
Index: /branches/eam_branches/ipp-20120601/Ohana/src/photdbc/src/PclientCommands.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/photdbc/src/PclientCommands.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/photdbc/src/PclientCommands.c	(revision 33985)
@@ -126,5 +126,4 @@
 int CheckBusyJob (HostInfo *host, IOBuffer *stdout_buf, IOBuffer *stderr_buf) {
 
-  int status;
   char *p;
   char string[64];
@@ -132,6 +131,6 @@
 
   InitIOBuffer (&buffer, 100);
-  status = PclientCommand (host, "status", &buffer);
-  status = PclientResponse (host, PCLIENT_PROMPT, &buffer);
+  PclientCommand (host, "status", &buffer);
+  PclientResponse (host, PCLIENT_PROMPT, &buffer);
 
   /** need to parse message **/
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/CoordOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/CoordOps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/CoordOps.c	(revision 33985)
@@ -11,7 +11,7 @@
 
   off_t N;
-  Image *images;
 
-  images = getimages (&N, NULL);
+  // Images *images = getimages (&N, NULL); return value ignored
+  getimages (&N, NULL);
 
   NoldCoords = N;
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/ImageOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/ImageOps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/ImageOps.c	(revision 33985)
@@ -426,5 +426,5 @@
     XY_to_LM (&Rx, &Dx, dLsig, 0.0, coords);
     dP0 = 3600.0 * hypot(Rx - Ro, Dx - Do); // convert to arcsec
-    XY_to_LM (&Rx, &Dx, 0.0, dLsig, coords);
+    XY_to_LM (&Rx, &Dx, 0.0, dMsig, coords);
     dP1 = 3600.0 * hypot(Rx - Ro, Dx - Do); // convert to arcsec
     dPosSys = 0.5 * (dP0 + dP1);
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/StarMaps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/StarMaps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/StarMaps.c	(revision 33985)
@@ -57,5 +57,4 @@
 int updateStarMaps(Catalog *catalog) {
 
-  Image *images;
   off_t i, N, Nimages;
   int xbin, ybin;
@@ -64,5 +63,6 @@
   gettimeofday (&start, (void *) NULL);
 
-  images = getimages(&Nimages, NULL);
+  // Images *images = getimages(&Nimages, NULL); return value ignored
+  getimages(&Nimages, NULL);
 
   for (i = 0; i < catalog[0].Nmeasure; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/relastro_merge_source.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/relastro_merge_source.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/relastro_merge_source.c	(revision 33985)
@@ -18,5 +18,5 @@
   dvo_catalog_init (&catalog_dst, TRUE);
   SkyRegion *region_src = NULL;
-  SkyRegion *region_dst = NULL;
+  // SkyRegion *region_dst = NULL;
 
   // load data from each region file, only use bright stars
@@ -26,7 +26,8 @@
       region_src = &sky[0].regions[i];
     }
+    // currently, we only accept dst == src...
     if (sky[0].regions[i].index == CAT_ID_DST) {
       catalog_dst.filename = sky[0].filename[i];
-      region_dst = &sky[0].regions[i];
+      // region_dst = &sky[0].regions[i];
     }
   }    
@@ -91,6 +92,4 @@
 
     // repoint the src measures at this object
-    Measure *measures_src;
-    ALLOCATE (measures_src, Measure, catalog_src.average[index_src].Nmeasure);
     m = catalog_src.average[index_src].measureOffset;
     for (i = 0; i < catalog_src.average[index_src].Nmeasure; i++, m++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/resort_catalog.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/resort_catalog.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/resort_catalog.c	(revision 33985)
@@ -112,5 +112,5 @@
   int NmeasureTotal = 0;
   int measureOffsetOK = TRUE;
-  for (i = 0; i < catalog[0].Naverage; i++) {
+  for (i = 0; i < Naverage; i++) {
     NmeasureTotal += catalog[0].average[i].Nmeasure;
     if (VERBOSE && !(NmeasureTotal <= catalog[0].Nmeasure)) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/select_images.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/select_images.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/select_images.c	(revision 33985)
@@ -292,5 +292,4 @@
 
   double theta1, theta2;
-  double Theta1, Theta2;
 
   theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); 
@@ -305,6 +304,4 @@
   }
 
-  Theta1 = theta1;
-  Theta2 = theta2;
   theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 
   theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/testparallax.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/testparallax.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relastro/src/testparallax.c	(revision 33985)
@@ -10,5 +10,5 @@
   double R[NPTS], D[NPTS], Time[NPTS], JD[NPTS];
   double X[NPTS], Y[NPTS], dX[NPTS], dY[NPTS], pX[NPTS], pY[NPTS];
-  double Tref[NPTS], Tjyrs[NPTS], TrefS, TjyrsS, TrefMean, TjyrsMean, Ro, Do;
+  double Tref[NPTS], Tjyrs[NPTS], TrefS, TjyrsS, TrefMean, Ro, Do;
   Coords coords;
   PMFit fitPAR;
@@ -82,5 +82,5 @@
   }
   TrefMean = TrefS / Npts;
-  TjyrsMean = TjyrsS / Npts;
+  // double TjyrsMean = TjyrsS / Npts;
 
   for (i = 0; i < Npts; i++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/GridOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/GridOps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/GridOps.c	(revision 33985)
@@ -423,6 +423,6 @@
 	Merr =  MAX (catalog[c].measureT[m].dM, MIN_ERROR);
 
-	// Wsys = 1.0 / SQ(Merr);
-	Wsys = 1.0;
+	// disable Wsys for now
+	Wsys = TRUE ? 1.0 : 1.0 / SQ(Merr);
 
 	Ng = gridmeas[c][m];
@@ -684,5 +684,4 @@
   off_t i, Nimage;
   int j, Nbytes, Nformat;
-  off_t *imlist;
   FILE *f;
   Header header, theader;
@@ -697,5 +696,6 @@
 
   /* select reference mosaic image */
-  imlist = SelectRefMosaic (&refmosaic, &Nimage);
+  // off_t *imlist = SelectRefMosaic (&refmosaic, &Nimage); return value ignored
+  SelectRefMosaic (&refmosaic, &Nimage);
 
   /* we are writing to this file */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/MosaicOps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/MosaicOps.c	(revision 33985)
@@ -762,5 +762,4 @@
 int setMmos_mosaic (Mosaic *myMosaic, off_t Nmos, Image *image, Catalog *catalog, SetMmosInfo *info, FlatCorrectionTable *flatcorr) {
 
-  Image *imageReal;
   off_t j, NimageReal;
 
@@ -776,5 +775,6 @@
   assert (Nmos < Nmosaic);
 
-  imageReal = getimages (&NimageReal, NULL);
+  // Image *imageReal = getimages (&NimageReal, NULL); returned pointer is not used
+  getimages (&NimageReal, NULL);
 
   /* on PoorImages run, skip good images */
@@ -1500,16 +1500,17 @@
   off_t i, j, m, c, N, ave, Nimage;
   double *xlist, *ylist;
-  double Xmin, Xmax, Ymin, Ymax;
+  // double Xmin, Xmax, Ymin, Ymax;
   char string[64];
-  Image *image;
   Graphdata graphdata;
 
   if (!MOSAIC_ZEROPT) return;
 
-  image = getimages (&Nimage, NULL);
+  // Image *image = getimages (&Nimage, NULL); returned value ignored
+  getimages (&Nimage, NULL);
 
   N = 0;
-  for (i = 0; i < Nmosaic; i++) 
+  for (i = 0; i < Nmosaic; i++) {
     N = MAX (N, N_onMosaic[i]);
+  }
 
   ALLOCATE (xlist, double, N);
@@ -1518,6 +1519,6 @@
   for (i = 0; i < Nmosaic; i++) {
     N = 0;
-    Xmin = Ymin = +360.0;
-    Xmax = Ymax = -360.0;
+    // Xmin = Ymin = +360.0;
+    // Xmax = Ymax = -360.0;
     for (j = 0; j < N_onMosaic[i]; j++) {
       
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/StarOps.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/StarOps.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/StarOps.c	(revision 33985)
@@ -1106,5 +1106,5 @@
   off_t j, N;
   double *xlist, *ylist;
-  double Xmin, Ymin, Xmax, Ymax;
+  // double Xmin, Ymin, Xmax, Ymax;
   Graphdata graphdata;
 
@@ -1117,6 +1117,6 @@
 
   N = 0;
-  Xmin = Ymin = +360.0;
-  Xmax = Ymax = -360.0;
+  // Xmin = Ymin = +360.0;
+  // Xmax = Ymax = -360.0;
   for (i = 0; i < Ncatalog; i++) {
     for (j = 0; j < catalog[i].Naverage; j++) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/select_images.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/select_images.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/relphot/src/select_images.c	(revision 33985)
@@ -296,5 +296,4 @@
 
   double theta1, theta2;
-  double Theta1, Theta2;
 
   theta1 = opening_angle (x1[0], y1[0], x2[0], y2[0], x1[1], y1[1]); 
@@ -309,6 +308,4 @@
   }
 
-  Theta1 = theta1;
-  Theta2 = theta2;
   theta1 = opening_angle (x2[0], y2[0], x1[1], y1[1], x2[1], y2[1]); 
   theta2 = opening_angle (x2[0], y2[0], x1[1], y1[1], x1[0], y1[0]); 
Index: /branches/eam_branches/ipp-20120601/Ohana/src/skycalc/src/time.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/skycalc/src/time.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/skycalc/src/time.c	(revision 33985)
@@ -65,9 +65,9 @@
   long ja, jdint, jalpha, jb, jc, jd, je;
   float jdfrac;
-  double x;
 
   jdin = jdin + 0.5;  /* adjust for 1/2 day */
   jdint = jdin;
-  x = jdint/7.+0.01;
+
+  // double x = jdint/7.+0.01; XXX why was this here?
   jdfrac = jdin - jdint;
   date->h = jdfrac * 24; /* truncate */
Index: /branches/eam_branches/ipp-20120601/Ohana/src/tools/src/fhead.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/tools/src/fhead.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/tools/src/fhead.c	(revision 33985)
@@ -5,5 +5,5 @@
 int main (int argc, char **argv) {
 
-  int N, Extnum, Nextend, status;
+  int N, Extnum, Nextend;
   int i, j;
   off_t nbytes;
@@ -45,5 +45,4 @@
       fprintf (stdout, "------> %s <------\n", argv[i]);
     
-    status = FALSE;
     if (!Extnum && !Extname) {
       if (!gfits_read_header (argv[i], &head)) {
Index: /branches/eam_branches/ipp-20120601/Ohana/src/tools/src/mktemp.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/tools/src/mktemp.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/tools/src/mktemp.c	(revision 33985)
@@ -16,5 +16,5 @@
   int i, j, Ntotal;
   char *tmpdir, *template, deftemplate[32], *prefix, defprefix[32], *filename;
-  int make_directory, fail_silently, unsafe_mode, full_path;
+  int make_directory, fail_silently, full_path;
 
   tmpdir = NULL;
@@ -25,5 +25,5 @@
   make_directory = FALSE;
   fail_silently = FALSE;
-  unsafe_mode = FALSE;
+  // int unsafe_mode = FALSE; -u not implemented
   full_path = TRUE;
 
@@ -56,8 +56,10 @@
 	  continue;
 	}
-	if (argv[i][j] == 'u') {
-	  unsafe_mode = TRUE;
-	  continue;
-	}
+	// -u == --dry-run, not implemented
+	// if (argv[i][j] == 'u') {
+	//   unsafe_mode = TRUE;
+	//   continue;
+	// }
+
 	// unknown option
 	usage();
Index: /branches/eam_branches/ipp-20120601/Ohana/src/uniphot/src/update_dvo_uniphot.c
===================================================================
--- /branches/eam_branches/ipp-20120601/Ohana/src/uniphot/src/update_dvo_uniphot.c	(revision 33984)
+++ /branches/eam_branches/ipp-20120601/Ohana/src/uniphot/src/update_dvo_uniphot.c	(revision 33985)
@@ -6,5 +6,5 @@
 
   off_t i, Nimage, Nkeep, *keep;
-  int j, status, Nmin;
+  int j, Nmin;
   char line[256];
   glob_t pglob;
@@ -55,5 +55,5 @@
   pglob.gl_offs = 0;
   sprintf (line, "%s/*/*.cpt", CATDIR);
-  status = glob (line, 0, NULL, &pglob);
+  glob (line, 0, NULL, &pglob);
 
   coords.crpix1 = coords.crpix2 = 0.0;
