Index: trunk/Ohana/checkpaths.pl
===================================================================
--- trunk/Ohana/checkpaths.pl	(revision 34088)
+++ trunk/Ohana/checkpaths.pl	(revision 34088)
@@ -0,0 +1,80 @@
+#!/usr/bin/env perl
+
+if (@ARGV != 1) { die "USAGE: checkpaths.pl (include/lib)\n"; }
+
+if ($ARGV[0] eq "lib")     { &checklinker;}
+if ($ARGV[0] eq "include") { &checkpreprocessor;}
+die "invalid command to checkpaths.pl : $ARGV[0]\n";
+
+sub checklinker {
+    # we are going to supplement the libpath with entries reported by
+    # the linker (this depends on ld --verbose 
+
+    my $line, @lines;
+    my $item, @items;
+
+    @lines = `ld --verbose | grep SEARCH_DIR`;
+    foreach $line (@lines) {
+	# we expect items of the form SEARCH_DIR("path");
+	# or SEARCH_DIR("=path") -- in that case we should prepend sysroo
+	next unless ($line =~ m|SEARCH_DIR|);
+	@items = split (";", $line);
+	foreach $item (@items) {
+	    next unless ($item);
+	    ($p1) = $item =~ m|SEARCH_DIR\050"=(\S*)"|;
+	    ($p2) = $item =~ m|SEARCH_DIR\050"(\S*)"|;
+	    next if (!$p1 && !$p2);
+	    if (!$p1 && $p2) {
+		push @libpath, $p2;
+	    }
+	    if ($p1 && $p2) {
+		push @libpath, $p1;
+	    }
+	    if ($p1 && !$p2) {
+		print "programming error!\n";
+		exit 4;
+	    }
+	}
+    }
+    print "@libpath\n";
+    exit 0;
+}
+
+sub checkpreprocessor {
+    # we are going to supplement the libpath with entries reported by
+    # the linker (this depends on ld --verbose 
+
+### #include <...> search starts here:
+###  /home/eugene/src/psconfig/ipp-dev.linux/include
+###  .
+###  /usr/lib/gcc/i686-linux-gnu/4.6/include
+###  /usr/local/include
+###  /usr/lib/gcc/i686-linux-gnu/4.6/include-fixed
+###  /usr/include/i386-linux-gnu
+###  /usr/include
+### End of search list.
+
+    my $line, @lines;
+    my $found_start;
+
+    @lines = `cpp --verbose < /dev/null 2>&1`;
+    $found_start = 0;
+    foreach $line (@lines) {
+	if (!$found_start) {
+	    if ($line =~ m|include \<...\> search starts here|) {
+		$found_start = 1;
+		next;
+	    } else {
+		next;
+	    }
+	}
+	chomp $line;
+	if ($line =~ m|End of search list|) {
+	    last;
+	}
+	($cleanline) = $line =~ m|\s*(\S*)|;
+	push @incpath, $cleanline;
+    }
+    print "@incpath\n";
+    exit 0;
+}
Index: trunk/Ohana/configure.tcsh
===================================================================
--- trunk/Ohana/configure.tcsh	(revision 34087)
+++ trunk/Ohana/configure.tcsh	(revision 34088)
@@ -10,4 +10,6 @@
 set optimize = 0
 set pedantic = 1
+set no_as_needed = 0
+set debug_build = 0
 set memcheck = 0
 set use_tcmalloc = 0
@@ -31,8 +33,14 @@
 while ("$1" != "") 
  switch ("$1")
-  # options passed by jhbuild or others which we ignore
+  # options passed by build systems which we ignore
   case --enable-maintainer-mode
   case --no-create
   case --no-recursion
+  case --disable-shared
+  case --enable-shared
+  case --disable-static
+  case --enable-static
+   breaksw;
+  # key/value options passed by build systems which we ignore
   case --sbindir*
   case --libexecdir*
@@ -49,12 +57,14 @@
    endif
    breaksw;
-  case --disable-shared
-  case --enable-shared
-  case --disable-static
-  case --enable-static
-    echo ""
-    echo "WARNING: Ohana can't turn shared/static builds on/off."
-    echo ""
-    breaksw;
+  case --enable-no-as-needed
+   set no_as_needed = 1
+   breaksw;
+  case --enable-debug-build
+   set debug_build = 1
+   set pedantic = 0
+   echo "disabling pedantic build"
+   endif    
+   breaksw;
+  # options used by Ohana, but not gpcsw
   case --vararch
    set vararch = 1
@@ -80,4 +90,8 @@
   case --pedantic
    set pedantic = 1
+   if ($debug_build) then
+    echo "--pedantic and --enable-debug-build are mutually exclusive"
+    exit 2;
+   endif    
    breaksw;
   case --no-pedantic
@@ -203,5 +217,7 @@
   set CPPFLAGS = ""
 endif  
+
 if ($pedantic) set CPPFLAGS = "$CPPFLAGS -Wall -Werror"
+if ($debug_build) set CPPFLAGS = "$CPPFLAGS -Wall"
 if ($memcheck) set CPPFLAGS = "$CPPFLAGS -DOHANA_MEMORY"
 
@@ -211,5 +227,10 @@
 if ($profile) set LDFLAGS = "$LDFLAGS -Wl,--start-group -Wl,-Bstatic -Wl,-Bdynamic"
 
+if ($no_as_needed) set LDFLAGS = "$LDFLAGS -Wl,--no-as-needed"
+
 set syslibpath = "/lib /usr/lib /usr/X11R6/lib /usr/local/lib"
+set xtrlibpath = `checkpaths.pl lib`
+set syslibpath = "$syslibpath $xtrlibpath"
+
 set needlibs   = ""
 set needlibs   = "$needlibs png"
@@ -226,4 +247,6 @@
 
 set sysincpath = "/usr/include /usr/local/include /usr/X11R6/include"
+set xtrincpath = `checkpaths.pl include`
+set sysincpath = "$sysincpath $xtrincpath"
 
 set needincs = ""
@@ -334,4 +357,6 @@
 echo "setting architecture to: $arch" 
 
+# add 
+
 # set up the basic directory names:
 set root = `pwd`
@@ -707,2 +732,3 @@
 EOF
  exit 2;
+
Index: trunk/Ohana/src/addstar/Makefile
===================================================================
--- trunk/Ohana/src/addstar/Makefile	(revision 34087)
+++ trunk/Ohana/src/addstar/Makefile	(revision 34088)
@@ -13,5 +13,5 @@
 
 # programs may add their own internal requirements here
-FULL_CFLAGS   = $(BASE_CFLAGS) -Wall -Werror
+FULL_CFLAGS   = $(BASE_CFLAGS)
 FULL_CPPFLAGS = $(BASE_CPPFLAGS)
 FULL_LDFLAGS  = -lkapa -ldvo -lFITS -lohana $(BASE_LDFLAGS)
Index: trunk/Ohana/src/addstar/src/GetFileMode.c
===================================================================
--- trunk/Ohana/src/addstar/src/GetFileMode.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/GetFileMode.c	(revision 34088)
@@ -7,10 +7,10 @@
 
   int Naxis;
-  int simple, extend, haveNaxis, haveCTYPE;
+  int simple, extend;
   int havePHOT_VER, haveTARG_VER;
 
   gfits_scan_alt (header, "SIMPLE", "%t", 1, &simple);
-  haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
-  haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
+  int haveNaxis = gfits_scan (header, "NAXIS",  "%d", 1, &Naxis);
+  int haveCTYPE = gfits_scan (header, "CTYPE1", "%s", 1, ctype);
 
   gfits_scan_alt (header, "EXTEND", "%t", 1, &extend);
@@ -22,6 +22,6 @@
   if (havePHOT_VER && haveTARG_VER) return SDSS_OBJ;
 
-  if ((Naxis == 2) || TEXTMODE || !simple) {
-    if (!strcmp (&ctype[4], "-WRP")) {
+  if (haveNaxis && ((Naxis == 2) || TEXTMODE || !simple)) {
+    if (haveCTYPE && !strcmp (&ctype[4], "-WRP")) {
       return MOSAIC_CMP;
     }
Index: trunk/Ohana/src/addstar/src/LoadData.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadData.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/LoadData.c	(revision 34088)
@@ -1,4 +1,3 @@
 # include "addstar.h"
-# define DVO_IMAGE_NAME_LEN 128
 
 // XXX this function is somewhat specific to the elixir format output files 
Index: trunk/Ohana/src/addstar/src/LoadDataPMM.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadDataPMM.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/LoadDataPMM.c	(revision 34088)
@@ -1,4 +1,3 @@
 # include "addstar.h"
-# define DVO_IMAGE_NAME_LEN 128
 
 /* .asc files look like:
Index: trunk/Ohana/src/addstar/src/ReadStarsSDSS.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadStarsSDSS.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/ReadStarsSDSS.c	(revision 34088)
@@ -1,4 +1,4 @@
 # include "addstar.h"
-# define DVO_IMAGE_NAME_LEN 128
+
 int SetSDSSFlags (Stars *star, unsigned int flags1, unsigned int flags2);
 
Index: trunk/Ohana/src/addstar/src/edge_check.c
===================================================================
--- trunk/Ohana/src/addstar/src/edge_check.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/edge_check.c	(revision 34088)
@@ -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: trunk/Ohana/src/addstar/src/get2mass_full.c
===================================================================
--- trunk/Ohana/src/addstar/src/get2mass_full.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/get2mass_full.c	(revision 34088)
@@ -23,7 +23,7 @@
   star[0][0].measure.theta = ToShortPixels(strtod (ptr, NULL));
 
-  star[2][0].measure.FWx   = star[2][0].measure.FWx   = star[0][0].measure.FWx;
-  star[2][0].measure.FWy   = star[2][0].measure.FWy   = star[0][0].measure.FWy;
-  star[2][0].measure.theta = star[2][0].measure.theta = star[0][0].measure.theta;
+  star[2][0].measure.FWx   = star[1][0].measure.FWx   = star[0][0].measure.FWx;
+  star[2][0].measure.FWy   = star[1][0].measure.FWy   = star[0][0].measure.FWy;
+  star[2][0].measure.theta = star[1][0].measure.theta = star[0][0].measure.theta;
 
   ptr = next2MASSfield (ptr); // designation (skip)
Index: trunk/Ohana/src/addstar/src/get2mass_ops.c
===================================================================
--- trunk/Ohana/src/addstar/src/get2mass_ops.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/get2mass_ops.c	(revision 34088)
@@ -73,5 +73,4 @@
 
   char *ptr;
-  char Jquality, Hquality, Kquality;
   double J, dJ, H, dH, K, dK;
   e_time time;
@@ -95,5 +94,10 @@
   dK = strtod (ptr, NULL);
 
-  /* filter on the ph_qual flag for this filter (field 19) */
+  // get the time
+  time = get2mass_time (ptr, 20, Nmax - (ptr - line));
+
+# 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) {
     ptr = skipNbounds (ptr, '|', 3, Nmax - (ptr - line));
@@ -105,4 +109,5 @@
     time = get2mass_time (ptr, 20, Nmax - (ptr - line));
   }
+# endif
 
   // how many bits are being used for the 2mass flags; can we just set photFlags based on them?
Index: trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/load2mass_as_rawdata.c	(revision 34088)
@@ -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: trunk/Ohana/src/addstar/src/load_subpix.c
===================================================================
--- trunk/Ohana/src/addstar/src/load_subpix.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/load_subpix.c	(revision 34088)
@@ -45,7 +45,7 @@
 
   int bin;
-  double dy, dM;
+  double dM;
 
-  dy = y - (int)(y);
+  // dy = y - (int)(y);
   bin = 5 * (int)(x/100) + (int)(y/100);
   dM = Subpix[bin].dM;
Index: trunk/Ohana/src/addstar/src/loadwise_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadwise_rawdata.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/loadwise_rawdata.c	(revision 34088)
@@ -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: trunk/Ohana/src/addstar/src/resort_catalog.c
===================================================================
--- trunk/Ohana/src/addstar/src/resort_catalog.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/resort_catalog.c	(revision 34088)
@@ -146,5 +146,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: trunk/Ohana/src/addstar/src/sky_tessalation.c
===================================================================
--- trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 34087)
+++ trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 34088)
@@ -2,5 +2,4 @@
 # include "assert.h"
 # define iSWAP(X,Y) {int tmp=(X); (X) = (Y); (Y) = tmp;}
-# define DVO_IMAGE_NAME_LEN 128
 
 // we use a static refcoords structure to avoid multiple alloc / init steps
Index: trunk/Ohana/src/delstar/src/args.c
===================================================================
--- trunk/Ohana/src/delstar/src/args.c	(revision 34087)
+++ trunk/Ohana/src/delstar/src/args.c	(revision 34088)
@@ -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: trunk/Ohana/src/delstar/src/find_matches.c
===================================================================
--- trunk/Ohana/src/delstar/src/find_matches.c	(revision 34087)
+++ trunk/Ohana/src/delstar/src/find_matches.c	(revision 34088)
@@ -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: trunk/Ohana/src/elixir/src/CheckMessages.c
===================================================================
--- trunk/Ohana/src/elixir/src/CheckMessages.c	(revision 34087)
+++ trunk/Ohana/src/elixir/src/CheckMessages.c	(revision 34088)
@@ -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: trunk/Ohana/src/gastro/src/gcenter.c
===================================================================
--- trunk/Ohana/src/gastro/src/gcenter.c	(revision 34087)
+++ trunk/Ohana/src/gastro/src/gcenter.c	(revision 34088)
@@ -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: trunk/Ohana/src/gastro/src/gstars.c
===================================================================
--- trunk/Ohana/src/gastro/src/gstars.c	(revision 34087)
+++ trunk/Ohana/src/gastro/src/gstars.c	(revision 34088)
@@ -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: trunk/Ohana/src/gastro2/src/getusnob.c
===================================================================
--- trunk/Ohana/src/gastro2/src/getusnob.c	(revision 34087)
+++ trunk/Ohana/src/gastro2/src/getusnob.c	(revision 34088)
@@ -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: trunk/Ohana/src/gastro2/src/gstars2.c
===================================================================
--- trunk/Ohana/src/gastro2/src/gstars2.c	(revision 34087)
+++ trunk/Ohana/src/gastro2/src/gstars2.c	(revision 34088)
@@ -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: trunk/Ohana/src/gastro2/src/rtext.c
===================================================================
--- trunk/Ohana/src/gastro2/src/rtext.c	(revision 34087)
+++ trunk/Ohana/src/gastro2/src/rtext.c	(revision 34088)
@@ -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: trunk/Ohana/src/gcompare/src/input.c
===================================================================
--- trunk/Ohana/src/gcompare/src/input.c	(revision 34087)
+++ trunk/Ohana/src/gcompare/src/input.c	(revision 34088)
@@ -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: trunk/Ohana/src/getstar/src/GetFileMode.c
===================================================================
--- trunk/Ohana/src/getstar/src/GetFileMode.c	(revision 34087)
+++ trunk/Ohana/src/getstar/src/GetFileMode.c	(revision 34088)
@@ -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: trunk/Ohana/src/getstar/src/ReadImageFiles.c
===================================================================
--- trunk/Ohana/src/getstar/src/ReadImageFiles.c	(revision 34087)
+++ trunk/Ohana/src/getstar/src/ReadImageFiles.c	(revision 34088)
@@ -1,4 +1,3 @@
 # include "dvoImageOverlaps.h"
-# define DVO_IMAGE_NAME_LEN 128
 
 Image *ReadImageFiles (char *filename, off_t *Nimages) {
Index: trunk/Ohana/src/getstar/src/edge_check.c
===================================================================
--- trunk/Ohana/src/getstar/src/edge_check.c	(revision 34087)
+++ trunk/Ohana/src/getstar/src/edge_check.c	(revision 34088)
@@ -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: trunk/Ohana/src/getstar/src/select_by_region.c
===================================================================
--- trunk/Ohana/src/getstar/src/select_by_region.c	(revision 34087)
+++ trunk/Ohana/src/getstar/src/select_by_region.c	(revision 34088)
@@ -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: trunk/Ohana/src/imclean/src/LoadStarsChad.c
===================================================================
--- trunk/Ohana/src/imclean/src/LoadStarsChad.c	(revision 34087)
+++ trunk/Ohana/src/imclean/src/LoadStarsChad.c	(revision 34088)
@@ -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: trunk/Ohana/src/imclean/src/LoadStarsSex.c
===================================================================
--- trunk/Ohana/src/imclean/src/LoadStarsSex.c	(revision 34087)
+++ trunk/Ohana/src/imclean/src/LoadStarsSex.c	(revision 34088)
@@ -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: trunk/Ohana/src/imregister/detrend/altpath.c
===================================================================
--- trunk/Ohana/src/imregister/detrend/altpath.c	(revision 34087)
+++ trunk/Ohana/src/imregister/detrend/altpath.c	(revision 34088)
@@ -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: trunk/Ohana/src/imregister/imphot/db_load.c
===================================================================
--- trunk/Ohana/src/imregister/imphot/db_load.c	(revision 34087)
+++ trunk/Ohana/src/imregister/imphot/db_load.c	(revision 34088)
@@ -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: trunk/Ohana/src/imregister/imphot/output.c
===================================================================
--- trunk/Ohana/src/imregister/imphot/output.c	(revision 34087)
+++ trunk/Ohana/src/imregister/imphot/output.c	(revision 34088)
@@ -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: trunk/Ohana/src/imregister/imreg/cadc.c
===================================================================
--- trunk/Ohana/src/imregister/imreg/cadc.c	(revision 34087)
+++ trunk/Ohana/src/imregister/imreg/cadc.c	(revision 34088)
@@ -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: trunk/Ohana/src/imregister/imreg/imregclient.c
===================================================================
--- trunk/Ohana/src/imregister/imreg/imregclient.c	(revision 34087)
+++ trunk/Ohana/src/imregister/imreg/imregclient.c	(revision 34088)
@@ -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,7 @@
       exit (1);
     }
-    status = fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm);
+    if (fscanf (f, "%d %f %f", &tmpint, &image[0].sky, &image[0].fwhm) != 3) {
+      fprintf (stderr, "error reading stats\n");
+    }
     image[0].ccd = tmpint;
     fclose (f);
@@ -46,5 +48,4 @@
       exit (1);
     }
-    status = 3;
     Nslice = image[0].seq;
     Nentry = Nslice + 1;
@@ -52,5 +53,7 @@
     for (i = 0; i < Nentry; i++) {
       image[i] = image[0];
-      status = fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm);
+      if (fscanf (f, "%d %f %f", &tmpint, &image[i].sky, &image[i].fwhm) != 3) {
+	fprintf (stderr, "error reading stats\n");
+      }
       image[i].seq = tmpint;
       if (image[i].seq == Nslice) continue;
Index: trunk/Ohana/src/imregister/imreg/modify.c
===================================================================
--- trunk/Ohana/src/imregister/imreg/modify.c	(revision 34087)
+++ trunk/Ohana/src/imregister/imreg/modify.c	(revision 34088)
@@ -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: trunk/Ohana/src/imregister/spreg/modify.c
===================================================================
--- trunk/Ohana/src/imregister/spreg/modify.c	(revision 34087)
+++ trunk/Ohana/src/imregister/spreg/modify.c	(revision 34088)
@@ -24,5 +24,5 @@
       if (!strncmp (spectrum[i].pathname, output.oldpath, Nold)) {
 	strcpy (tmppath, &spectrum[i].pathname[Nold]);
-	snprintf (spectrum[i].pathname, 128, "%s%s", output.newpath, tmppath);
+	snprintf (spectrum[i].pathname, 64, "%s%s", output.newpath, tmppath);
       }
     }
Index: trunk/Ohana/src/imregister/src/imphotmerge.c
===================================================================
--- trunk/Ohana/src/imregister/src/imphotmerge.c	(revision 34087)
+++ trunk/Ohana/src/imregister/src/imphotmerge.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/CheckVisual.c
===================================================================
--- trunk/Ohana/src/kapa2/src/CheckVisual.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/CheckVisual.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/DrawFrame.c
===================================================================
--- trunk/Ohana/src/kapa2/src/DrawFrame.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/DrawFrame.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/EraseOverlay.c
===================================================================
--- trunk/Ohana/src/kapa2/src/EraseOverlay.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/EraseOverlay.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/JPEGit24.c
===================================================================
--- trunk/Ohana/src/kapa2/src/JPEGit24.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/JPEGit24.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/Layout.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Layout.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/Layout.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/PSFrame.c
===================================================================
--- trunk/Ohana/src/kapa2/src/PSFrame.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/PSFrame.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/PSPixmap.c
===================================================================
--- trunk/Ohana/src/kapa2/src/PSPixmap.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/PSPixmap.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/PaintOverlay.c
===================================================================
--- trunk/Ohana/src/kapa2/src/PaintOverlay.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/PaintOverlay.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/Remap16.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Remap16.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/Remap16.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/Remap24.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Remap24.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/Remap24.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/Remap32.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Remap32.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/Remap32.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/Remap8.c
===================================================================
--- trunk/Ohana/src/kapa2/src/Remap8.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/Remap8.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/SetGraphSize.c
===================================================================
--- trunk/Ohana/src/kapa2/src/SetGraphSize.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/SetGraphSize.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/SetImageData.c
===================================================================
--- trunk/Ohana/src/kapa2/src/SetImageData.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/SetImageData.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/bDrawFrame.c
===================================================================
--- trunk/Ohana/src/kapa2/src/bDrawFrame.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/bDrawFrame.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/bDrawImage.c
===================================================================
--- trunk/Ohana/src/kapa2/src/bDrawImage.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/bDrawImage.c	(revision 34088)
@@ -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: trunk/Ohana/src/kapa2/src/bDrawOverlay.c
===================================================================
--- trunk/Ohana/src/kapa2/src/bDrawOverlay.c	(revision 34087)
+++ trunk/Ohana/src/kapa2/src/bDrawOverlay.c	(revision 34088)
@@ -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: trunk/Ohana/src/libautocode/def/common.h
===================================================================
--- trunk/Ohana/src/libautocode/def/common.h	(revision 34087)
+++ trunk/Ohana/src/libautocode/def/common.h	(revision 34088)
@@ -32,4 +32,6 @@
 # define rawshort short
 
+# define DVO_IMAGE_NAME_LEN 121
+
 /*** rawshort is used to handle the broken pre-autocode photreg tables
      fix the tables and remove this
Index: trunk/Ohana/src/libdvo/src/ImageOps.c
===================================================================
--- trunk/Ohana/src/libdvo/src/ImageOps.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/ImageOps.c	(revision 34088)
@@ -8,5 +8,5 @@
 {
 
-  int j, flipped, status, InPic;
+  int j, flipped, status;
   off_t i, n, *subset;
   int npts;
@@ -65,5 +65,5 @@
       x[2] = image[i].NX; y[2] = image[i].NY;
       x[3] = 0;           y[3] = image[i].NY;
-      InPic = flipped = FALSE;
+      flipped = FALSE;
       for (j = 0; j < 4; j++) {
 	XY_to_RD (&r, &d, x[j], y[j], &image[i].coords);
@@ -95,5 +95,5 @@
       x[2] = image[i].NX; y[2] = image[i].NY;
       x[3] = 0;           y[3] = image[i].NY;
-      InPic = flipped = FALSE;
+      flipped = FALSE;
       for (j = 0; j < 4; j++) {
 	XY_to_RD (&r, &d, x[j], y[j], &image[i].coords);
Index: trunk/Ohana/src/libdvo/src/coordops.c
===================================================================
--- trunk/Ohana/src/libdvo/src/coordops.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/coordops.c	(revision 34088)
@@ -68,5 +68,5 @@
   mode = GetProjectionMode (proj);
   if (proj == PROJ_NONE) return (FALSE);
-  if (proj == PROJ_MODE_NONE) return (FALSE);
+  if (mode == PROJ_MODE_NONE) return (FALSE);
 
   stht = ctht = 1;
@@ -201,5 +201,5 @@
   mode = GetProjectionMode (proj);
   if (proj == PROJ_NONE) return (FALSE);
-  if (proj == PROJ_MODE_NONE) return (FALSE);
+  if (mode == PROJ_MODE_NONE) return (FALSE);
 
   /**** Locally Cartesian Projections ****/
Index: trunk/Ohana/src/libdvo/src/dbCmdlineFields.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dbCmdlineFields.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/dbCmdlineFields.c	(revision 34088)
@@ -136,7 +136,7 @@
     // XXX the ra and dec range depend on the projection. 
     // XXX this is wrong...
-    int status;
-    status = XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
-    status = XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
+    // int status;
+    XY_to_RD (&Rmin, &Dmin, graphsky.xmin, graphsky.ymin, &graphsky.coords);
+    XY_to_RD (&Rmax, &Dmax, graphsky.xmax, graphsky.ymax, &graphsky.coords);
   }
 
Index: trunk/Ohana/src/libdvo/src/dbRPN.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dbRPN.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/dbRPN.c	(revision 34088)
@@ -4,5 +4,5 @@
 dbStack *dbRPN (int argc, char **argv, int *nstack) {
   
-  int type, Nx, Ny;
+  int type;
   int i, j, Nstack, Nop_stack, NSTACK;
   dbStack *stack, *op_stack;
@@ -17,5 +17,5 @@
   }
   
-  Nx = Ny = Nstack = Nop_stack = 0;
+  Nstack = Nop_stack = 0;
   for (i = 0; i < argc; i++) {
     
Index: trunk/Ohana/src/libdvo/src/dvo_image.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_image.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/dvo_image.c	(revision 34088)
@@ -111,5 +111,5 @@
       exit (2);
   }
-  return (TRUE);
+  return (status);
 }
 
Index: trunk/Ohana/src/libdvo/src/dvo_tiny_values.c
===================================================================
--- trunk/Ohana/src/libdvo/src/dvo_tiny_values.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/dvo_tiny_values.c	(revision 34088)
@@ -51,5 +51,5 @@
 
     for (i = 0; i < catalog[0].Naverage; i++) {
-      CopyAverageToTiny (&catalog[0].averageT[i], &catalog[0].average[i]);
+      CopyAverageToTiny (&averageT[i], &average[i]);
     }
   }
@@ -61,5 +61,5 @@
 
     for (i = 0; i < catalog[0].Nmeasure; i++) {
-      CopyMeasureToTiny (&catalog[0].measureT[i], &catalog[0].measure[i]);
+      CopyMeasureToTiny (&measureT[i], &measure[i]);
     }
   }
Index: trunk/Ohana/src/libdvo/src/skyregion_gsc.c
===================================================================
--- trunk/Ohana/src/libdvo/src/skyregion_gsc.c	(revision 34087)
+++ trunk/Ohana/src/libdvo/src/skyregion_gsc.c	(revision 34088)
@@ -271,5 +271,4 @@
   int i, j, Nz, NZ, Nregions, poleRegion;
   SkyRegion *regions;
-  SkyRegion tempregion;
   SkyRegionZone *zones;
   char basename[64];
@@ -294,5 +293,4 @@
       poleRegion = SIGN(regions[i].Dmin);
       Nregions --;
-      tempregion = regions[i];
       for (j = i; j < Nregions; j++) {
 	regions[j] = regions[j+1];
Index: trunk/Ohana/src/libfits/Makefile
===================================================================
--- trunk/Ohana/src/libfits/Makefile	(revision 34087)
+++ trunk/Ohana/src/libfits/Makefile	(revision 34088)
@@ -16,5 +16,5 @@
 
 # programs may add their own internal requirements here
-FULL_CFLAGS   = $(BASE_CFLAGS) -fPIC -Wall -Werror
+FULL_CFLAGS   = $(BASE_CFLAGS) -fPIC
 FULL_CPPFLAGS = $(BASE_CPPFLAGS) -I$(EXT)
 FULL_LDFLAGS  = $(BASE_LDFLAGS) -lohana
Index: trunk/Ohana/src/libfits/extern/fits_hdecompress.c
===================================================================
--- trunk/Ohana/src/libfits/extern/fits_hdecompress.c	(revision 34087)
+++ trunk/Ohana/src/libfits/extern/fits_hdecompress.c	(revision 34088)
@@ -1048,5 +1048,5 @@
 {
 LONGLONG sumall;
-int nel, stat;
+int stat;
 unsigned char nbitplanes[3];
 char tmagic[2];
@@ -1071,5 +1071,5 @@
 	*scale=readint(infile);				/* scale factor for digitization	*/
 	
-	nel = (*nx) * (*ny);
+	// nel = (*nx) * (*ny);
 
 	/* sum of all pixels	*/
@@ -1095,5 +1095,5 @@
 */
 {
-int nel, stat;
+int stat;
 LONGLONG sumall;
 unsigned char nbitplanes[3];
@@ -1119,5 +1119,5 @@
 	*scale=readint(infile);				/* scale factor for digitization	*/
 	
-	nel = (*nx) * (*ny);
+	// nel = (*nx) * (*ny);
 
 	/* sum of all pixels	*/
Index: trunk/Ohana/src/libfits/extern/ricecomp.c
===================================================================
--- trunk/Ohana/src/libfits/extern/ricecomp.c	(revision 34087)
+++ trunk/Ohana/src/libfits/extern/ricecomp.c	(revision 34088)
@@ -59,5 +59,5 @@
 {
 Buffer bufmem, *buffer = &bufmem;
-int bsize, i, j, thisblock;
+int i, j, thisblock;
 int lastpix, nextpix, pdiff;
 int v, fs, fsmask, top, fsmax, fsbits, bbits;
@@ -73,5 +73,5 @@
      * compression of short & byte images.
      */
-    bsize = 4;
+// int bsize = 4;
 
 /*    nblock = 32; now an input parameter*/
@@ -277,5 +277,5 @@
 {
 Buffer bufmem, *buffer = &bufmem;
-int bsize, i, j, thisblock;
+int i, j, thisblock;
 
 /* 
@@ -299,5 +299,5 @@
      * compression of short & byte images.
      */
-    bsize = 2;
+// bsize = 2;
 
 /*    nblock = 32; now an input parameter */
@@ -501,5 +501,5 @@
 {
 Buffer bufmem, *buffer = &bufmem;
-int bsize, i, j, thisblock;
+int i, j, thisblock;
 
 /* 
@@ -523,5 +523,5 @@
      * compression of short & byte images.
      */
-    bsize = 1;
+    // bsize = 1;
 
 /*    nblock = 32; now an input parameter */
@@ -826,5 +826,5 @@
 	     int nblock)		/* coding block size		*/
 {
-int bsize, i, k, imax;
+int i, k, imax;
 int nbits, nzero, fs;
 unsigned char *cend, bytevalue;
@@ -839,5 +839,5 @@
      * compression of short & byte images.
      */
-    bsize = 4;
+// bsize = 4;
 
 /*    nblock = 32; now an input parameter */
@@ -1014,5 +1014,5 @@
 {
 int i, imax;
-int bsize, k;
+int k;
 int nbits, nzero, fs;
 unsigned char *cend, bytevalue;
@@ -1028,5 +1028,5 @@
      */
 
-    bsize = 2;
+// bsize = 2;
     
 /*    nblock = 32; now an input parameter */
@@ -1200,5 +1200,5 @@
 {
 int i, imax;
-int bsize, k;
+int k;
 int nbits, nzero, fs;
 unsigned char *cend;
@@ -1214,5 +1214,5 @@
      */
 
-    bsize = 1;
+// bsize = 1;
     
 /*    nblock = 32; now an input parameter */
Index: trunk/Ohana/src/libfits/matrix/F_compress_M.c
===================================================================
--- trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 34087)
+++ trunk/Ohana/src/libfits/matrix/F_compress_M.c	(revision 34088)
@@ -45,5 +45,5 @@
   float zscale, zzero;
 
-  int zdata_pixsize, odata_pixsize, idata_pixsize;
+  int zdata_pixsize, odata_pixsize;
 
   int *ztile = NULL;
@@ -236,6 +236,6 @@
   zdata_pixsize = gfits_vartable_heap_pixsize (zdef.format);
 
-  // size of a pixel in the final image
-  idata_pixsize = abs(header[0].bitpix) / 8;
+  // size of a pixel in the final image (not needed)
+  // idata_pixsize = abs(header[0].bitpix) / 8;
 
   // size of a pixel in the output from the decompression routine
@@ -480,9 +480,9 @@
 int gfits_compressed_is_primary (Header *header) {
 
-    int has_ztension, has_zimage;
-    int ztension, zimage;
-
-    has_zimage   = gfits_scan_alt (header, "ZIMAGE",   "%t", 1, &zimage);
-    has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);
+  int zimage = FALSE;
+  // int ztension = FALSE;
+
+    int has_zimage   = gfits_scan_alt (header, "ZIMAGE",   "%t", 1, &zimage);
+    // int has_ztension = gfits_scan_alt (header, "ZTENSION", "%t", 1, &ztension);
 
     if (has_zimage && zimage) return (TRUE);
Index: trunk/Ohana/src/libfits/table/F_copy_T.c
===================================================================
--- trunk/Ohana/src/libfits/table/F_copy_T.c	(revision 34087)
+++ trunk/Ohana/src/libfits/table/F_copy_T.c	(revision 34088)
@@ -17,9 +17,9 @@
 int gfits_copy_vtable (VTable *in, VTable *out) {
 
-  off_t i, Nx, Ny, Nrows;
+  off_t i;
 
   /* find buffer size */
-  Nx = in[0].header[0].Naxis[0];
-  Ny = in[0].header[0].Naxis[1];
+  off_t Nx = in[0].header[0].Naxis[0];
+  // off_t Ny = in[0].header[0].Naxis[1];
 
   // validate these two?
@@ -32,5 +32,5 @@
   out[0].Nrow     = in[0].Nrow;
 
-  Nrows = out[0].Nrow;
+  off_t Nrows = out[0].Nrow;
 
   ALLOCATE (out[0].row, off_t, MAX (Nrows, 1));
Index: trunk/Ohana/src/libkapa/src/DrawRotString.c
===================================================================
--- trunk/Ohana/src/libkapa/src/DrawRotString.c	(revision 34087)
+++ trunk/Ohana/src/libkapa/src/DrawRotString.c	(revision 34088)
@@ -77,4 +77,5 @@
     /* check for special characters */
     if (!code && !protect) {
+      /* subscript, starts with _ */
       if (N == 94) {
 	SetRotFont (currentname, (int)(0.8*currentsize));
@@ -83,4 +84,5 @@
 	continue;
       }
+      /* superscript, starts with ^ */
       if (N == 95) { 
 	SetRotFont (currentname, (int)(0.8*currentsize));
@@ -89,4 +91,5 @@
 	continue;
       }
+      /* normal script, starts with | */
       if (N == 124) {
 	SetRotFont (currentname, basesize);
@@ -137,5 +140,5 @@
 
   int ii, jj, byte_line, byte, bit, flag;
-  unsigned long int fore, back;
+  unsigned long int fore;
   double i, j, cs, sn, rscale, tmp;
   int X, Y, X0, X1, X2, Y0, Y1, Y2, x0, y0;
@@ -143,8 +146,8 @@
   if (mode) {
     fore = RotForeground;
-    back = RotBackground;
+    // back = RotBackground;
   } else {
     fore = RotBackground;
-    back = RotForeground;
+    // back = RotForeground;
   } 
     
Index: trunk/Ohana/src/libkapa/src/KapaOpen.c
===================================================================
--- trunk/Ohana/src/libkapa/src/KapaOpen.c	(revision 34087)
+++ trunk/Ohana/src/libkapa/src/KapaOpen.c	(revision 34088)
@@ -252,5 +252,5 @@
 int KapaOpenNamedSocket (char *kapa_exec, char *name) {
 
-  int InitSocket, status;
+  int InitSocket;
   struct sockaddr_un Address;
   socklen_t AddressLength;
@@ -269,6 +269,6 @@
   Address.sun_family = AF_UNIX;
   InitSocket = socket (AF_UNIX, SOCK_STREAM, 0);
-  status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
-  status = listen (InitSocket, 1);
+  bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
+  listen (InitSocket, 1);
 
   if (name == NULL) {
Index: trunk/Ohana/src/libkapa/src/KiiOpen.c
===================================================================
--- trunk/Ohana/src/libkapa/src/KiiOpen.c	(revision 34087)
+++ trunk/Ohana/src/libkapa/src/KiiOpen.c	(revision 34088)
@@ -4,5 +4,5 @@
 int KiiOpen (char *kii_exec, char *name) {
 
-  int InitSocket, status;
+  int InitSocket;
   struct sockaddr_un Address;
   socklen_t AddressLength;
@@ -21,6 +21,6 @@
   Address.sun_family = AF_UNIX; 
   InitSocket = socket (AF_UNIX, SOCK_STREAM, 0); 
-  status = bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
-  status = listen (InitSocket, 1);
+  bind (InitSocket, (struct sockaddr *) &Address, sizeof (Address));
+  listen (InitSocket, 1);
   
   if (name == NULL) {
Index: trunk/Ohana/src/libkapa/src/KiiPicture.c
===================================================================
--- trunk/Ohana/src/libkapa/src/KiiPicture.c	(revision 34087)
+++ trunk/Ohana/src/libkapa/src/KiiPicture.c	(revision 34088)
@@ -22,5 +22,5 @@
 
   int Nwrite, Npix, Ncolors, size;
-  float *in, min, max;
+  float min, max;
 
   Npix = image[0].Nx*image[0].Ny;
@@ -28,6 +28,4 @@
   KiiSendCommand (fd, 4, "READ"); /* tell kapa to look for the incoming image */
   KiiScanMessage (fd, "%d", &Ncolors);
-
-  in = image[0].data1d;
 
   /* these are for a future upgrade */
Index: trunk/Ohana/src/libohana/src/config.c
===================================================================
--- trunk/Ohana/src/libohana/src/config.c	(revision 34087)
+++ trunk/Ohana/src/libohana/src/config.c	(revision 34088)
@@ -131,5 +131,5 @@
   
   FILE *f;
-  int i, done, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;
+  int i, Nbytes, NBYTES, nbytes, Nout, Ncpy, INPUT, Nlevel;
   char *ibuffer, *obuffer, *tbuffer;
   char *last, *next;
@@ -149,5 +149,4 @@
   /* load data from file */
   if (f) {
-    done = FALSE;
     while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) {
       Nbytes += nbytes;
@@ -382,5 +381,5 @@
   
   FILE *f;
-  int i, done, Nbytes, NBYTES, nbytes, Ncpy;
+  int i, Nbytes, NBYTES, nbytes, Ncpy;
   char *ibuffer;
   char line[256];
@@ -398,5 +397,4 @@
     
   /* load data from file */
-  done = FALSE;
   while ((nbytes = fread (&ibuffer[Nbytes], sizeof(char), D_NBYTES, f)) == D_NBYTES) {
     Nbytes += nbytes;
Index: trunk/Ohana/src/libohana/src/time.c
===================================================================
--- trunk/Ohana/src/libohana/src/time.c	(revision 34087)
+++ trunk/Ohana/src/libohana/src/time.c	(revision 34088)
@@ -95,4 +95,5 @@
   p1 = line;
   tmp = strtod (p1, &p2);
+  if (0) { fprintf (stderr, "tmp: %f\n", tmp); }
   mode = TIME_DATE;
   if (p2 == p1 + strlen (p1) - 1) {
Index: trunk/Ohana/src/misc/src/mkgauss.c
===================================================================
--- trunk/Ohana/src/misc/src/mkgauss.c	(revision 34087)
+++ trunk/Ohana/src/misc/src/mkgauss.c	(revision 34088)
@@ -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: trunk/Ohana/src/mosastro/src/clip.c
===================================================================
--- trunk/Ohana/src/mosastro/src/clip.c	(revision 34087)
+++ trunk/Ohana/src/mosastro/src/clip.c	(revision 34088)
@@ -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: trunk/Ohana/src/mosastro/src/getusnob.c
===================================================================
--- trunk/Ohana/src/mosastro/src/getusnob.c	(revision 34087)
+++ trunk/Ohana/src/mosastro/src/getusnob.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/cdot.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/cdot.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/cdot.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/cline.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/cline.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/cline.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/fixcols.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fixcols.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/fixcols.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/fiximage.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/fiximage.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/fiximage.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/gauss.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/gauss.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/gauss.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/getvel.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/getvel.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/getvel.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/imfit.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imfit.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/imfit.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/imsub.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/imsub.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/imsub.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/kronflux.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/kronflux.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/kronflux.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/medianmap.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/medianmap.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/medianmap.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/objload.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/objload.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/objload.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/outline.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/outline.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/outline.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/rotcurve.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/rotcurve.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/rotcurve.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/spec.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/spec.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/spec.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/star.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/star.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/star.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.astro/transform.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.astro/transform.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.astro/transform.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/densify.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/densify.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/densify.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/gaussdeviate.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/list_header.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/list_header.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/list_header.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/load.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/load.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/load.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/lookup.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/lookup.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/lookup.c	(revision 34088)
@@ -37,5 +37,5 @@
 
     for (j = 0; (*ip < *xp) && (j < yv[0].Nelements); j++);
-    *op = j;
+    *op = *yp;
   }      
 
Index: trunk/Ohana/src/opihi/cmd.data/rotate.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/rotate.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/rotate.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/shift.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/shift.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/shift.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/spline_apply.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/spline_apply.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/spline_apply.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/cmd.data/spline_construct.c
===================================================================
--- trunk/Ohana/src/opihi/cmd.data/spline_construct.c	(revision 34087)
+++ trunk/Ohana/src/opihi/cmd.data/spline_construct.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/avextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/avextract.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/avextract.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/calextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/calextract.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/calextract.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/calmextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/calmextract.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/ccd.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/ccd.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/ccd.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/cmd.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmd.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/cmd.c	(revision 34088)
@@ -8,5 +8,4 @@
   int Npts, NPTS, mode[3];
   int Nsecfilt, KeepNulls;
-  void *Signal;
 
   PhotCode *code[3];
@@ -61,5 +60,6 @@
 
   // grab data from all selected sky regions
-  Signal = signal (SIGINT, handle_interrupt);
+  // void *Signal = signal (SIGINT, handle_interrupt);
+  signal (SIGINT, handle_interrupt);
   interrupt = FALSE;
 
Index: trunk/Ohana/src/opihi/dvo/cmpload.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/cmpload.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/cmpload.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/fitsed.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/fitsed.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/fitsed.c	(revision 34088)
@@ -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,4 @@
   /* load photcode information */
   if (!InitPhotcodes ()) goto escape;
-  Nsecfilt = GetPhotcodeNsecfilt ();
 
   /* interpret command-line options */
Index: trunk/Ohana/src/opihi/dvo/gcat.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gcat.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/gcat.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/hosts.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/hosts.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/hosts.c	(revision 34088)
@@ -15,4 +15,5 @@
   if (!strncmp(argv[1], "purge-temp", MAX(strlen(argv[1]), 3))) {
     glob_t pglob;
+    int ALL_PID = FALSE;
     int PID = getpid();
     int N;
@@ -20,4 +21,10 @@
       remove_argument (N, &argc, argv);
       PID = atoi(argv[N]);
+      remove_argument (N, &argc, argv);
+    }
+
+    if ((N = get_argument (argc, argv, "-all-pid"))) {
+      remove_argument (N, &argc, argv);
+      ALL_PID = TRUE;
       remove_argument (N, &argc, argv);
     }
@@ -60,5 +67,9 @@
       pglob.gl_offs = 0;
       char name[DVO_MAX_PATH];
-      snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
+      if (ALL_PID) {
+	snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.*.fits", table->hosts[i].pathname);
+      } else {
+	snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
+      }
       if (VERBOSE) gprint (GP_ERR, "checking %s\n", name);
       glob (name, 0, NULL, &pglob);
Index: trunk/Ohana/src/opihi/dvo/images.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/images.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/images.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/imdata.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imdata.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/imdata.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/imextract.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imextract.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/imextract.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/imlist.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imlist.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/imlist.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/imphot.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/imphot.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/imphot.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/lcurve.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/lcurve.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/objectcoverage.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/objectcoverage.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/objectcoverage.c	(revision 34088)
@@ -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;
+  int N, status, xs, ys;
+  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: trunk/Ohana/src/opihi/dvo/paverage.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/paverage.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/paverage.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/pmeasure.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/pmeasure.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/simage.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/simage.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/simage.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/dvo/skycat.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/skycat.c	(revision 34087)
+++ trunk/Ohana/src/opihi/dvo/skycat.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/lib.data/starfuncs.c
===================================================================
--- trunk/Ohana/src/opihi/lib.data/starfuncs.c	(revision 34087)
+++ trunk/Ohana/src/opihi/lib.data/starfuncs.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/lib.data/svdcmp.c
===================================================================
--- trunk/Ohana/src/opihi/lib.data/svdcmp.c	(revision 34087)
+++ trunk/Ohana/src/opihi/lib.data/svdcmp.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/lib.shell/convert_to_RPN.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/convert_to_RPN.c	(revision 34087)
+++ trunk/Ohana/src/opihi/lib.shell/convert_to_RPN.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/lib.shell/evaluate_stack.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/evaluate_stack.c	(revision 34087)
+++ trunk/Ohana/src/opihi/lib.shell/evaluate_stack.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/lib.shell/opihi.c
===================================================================
--- trunk/Ohana/src/opihi/lib.shell/opihi.c	(revision 34087)
+++ trunk/Ohana/src/opihi/lib.shell/opihi.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/pantasks/ControllerOps.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 34087)
+++ trunk/Ohana/src/opihi/pantasks/ControllerOps.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/pantasks/client_shell.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/client_shell.c	(revision 34087)
+++ trunk/Ohana/src/opihi/pantasks/client_shell.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/pantasks/task.c
===================================================================
--- trunk/Ohana/src/opihi/pantasks/task.c	(revision 34087)
+++ trunk/Ohana/src/opihi/pantasks/task.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/pcontrol/CheckHost.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/CheckHost.c	(revision 34087)
+++ trunk/Ohana/src/opihi/pcontrol/CheckHost.c	(revision 34088)
@@ -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: trunk/Ohana/src/opihi/pcontrol/CheckSystem.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/CheckSystem.c	(revision 34087)
+++ trunk/Ohana/src/opihi/pcontrol/CheckSystem.c	(revision 34088)
@@ -62,7 +62,5 @@
 void *CheckSystem_Threaded (void *data) {
 
-  int Njobchecks, Nhostchecks, Nlivechecks, Ndonejobs;
-
-  Nlivechecks = 0;
+  int Njobchecks, Nhostchecks, Ndonejobs;
 
   gprintInit ();
Index: trunk/Ohana/src/opihi/pcontrol/Makefile
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/Makefile	(revision 34087)
+++ trunk/Ohana/src/opihi/pcontrol/Makefile	(revision 34088)
@@ -13,5 +13,5 @@
 LIBS1         = -lkapa -lFITS -lohana
 LIBS2         = -lbasiccmd -lshell -ldata 
-FULL_CFLAGS   = $(BASE_CFLAGS) -Wall -Werror
+FULL_CFLAGS   = $(BASE_CFLAGS)
 FULL_CPPFLAGS = $(BASE_CPPFLAGS)
 FULL_LDFLAGS  = $(LIBS1) $(LIBS2) $(BASE_LDFLAGS)
Index: trunk/Ohana/src/photdbc/src/CopyBackupToHost.c
===================================================================
--- trunk/Ohana/src/photdbc/src/CopyBackupToHost.c	(revision 34087)
+++ trunk/Ohana/src/photdbc/src/CopyBackupToHost.c	(revision 34088)
@@ -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: trunk/Ohana/src/photdbc/src/PclientCommands.c
===================================================================
--- trunk/Ohana/src/photdbc/src/PclientCommands.c	(revision 34087)
+++ trunk/Ohana/src/photdbc/src/PclientCommands.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/CoordOps.c
===================================================================
--- trunk/Ohana/src/relastro/src/CoordOps.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/CoordOps.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/ImageOps.c
===================================================================
--- trunk/Ohana/src/relastro/src/ImageOps.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/ImageOps.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/StarMaps.c
===================================================================
--- trunk/Ohana/src/relastro/src/StarMaps.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/StarMaps.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/relastro_merge_source.c
===================================================================
--- trunk/Ohana/src/relastro/src/relastro_merge_source.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/relastro_merge_source.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/resort_catalog.c
===================================================================
--- trunk/Ohana/src/relastro/src/resort_catalog.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/resort_catalog.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/select_images.c
===================================================================
--- trunk/Ohana/src/relastro/src/select_images.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/select_images.c	(revision 34088)
@@ -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: trunk/Ohana/src/relastro/src/testparallax.c
===================================================================
--- trunk/Ohana/src/relastro/src/testparallax.c	(revision 34087)
+++ trunk/Ohana/src/relastro/src/testparallax.c	(revision 34088)
@@ -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: trunk/Ohana/src/relphot/src/GridOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/GridOps.c	(revision 34087)
+++ trunk/Ohana/src/relphot/src/GridOps.c	(revision 34088)
@@ -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: trunk/Ohana/src/relphot/src/MosaicOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 34087)
+++ trunk/Ohana/src/relphot/src/MosaicOps.c	(revision 34088)
@@ -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: trunk/Ohana/src/relphot/src/StarOps.c
===================================================================
--- trunk/Ohana/src/relphot/src/StarOps.c	(revision 34087)
+++ trunk/Ohana/src/relphot/src/StarOps.c	(revision 34088)
@@ -354,4 +354,5 @@
       int Next = 0;
       int haveSynth = FALSE;
+      int haveStack = FALSE;
 
       int forceSynth = FALSE;
@@ -413,4 +414,10 @@
 	    }
 	  }
+	  // gpc1 stack data
+	  if ((catalog[Nc].measure[m].photcode >= 11000) && (catalog[Nc].measure[m].photcode <= 11400)) {
+	    if (pass < 2) continue;
+	    haveStack = TRUE;
+	  }
+
 	  // count extended detections for 2MASS (XXX NOTE hardwired photcodes 2011, 2012, 2013)
 	  if ((catalog[Nc].measure[m].photcode >= 2011) && (catalog[Nc].measure[m].photcode <= 2013)) {
@@ -477,4 +484,5 @@
 	// up-weight the ubercal values (or convergence can take a long time...)
 	if (catalog[Nc].measureT[m].dbFlags & ID_MEAS_PHOTOM_UBERCAL) {
+	  haveUbercal = TRUE;
 	  wlist[N] = 10.0;
 	}
@@ -492,4 +500,8 @@
 
       int Nminmeas = isSetMrelFinal ? 1 : STAR_TOOFEW + 1;
+
+      if (haveStack && (N > 1)) {
+	// fprintf (stderr, "multiple stack values for %10.6f %10.6f\n", catalog[Nc].averageT[j].R, catalog[Nc].averageT[j].D);
+      }
 
       // when performing the grid analysis, STAR_TOOFEW should be set to 1;
@@ -1106,5 +1118,5 @@
   off_t j, N;
   double *xlist, *ylist;
-  double Xmin, Ymin, Xmax, Ymax;
+  // double Xmin, Ymin, Xmax, Ymax;
   Graphdata graphdata;
 
@@ -1117,6 +1129,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: trunk/Ohana/src/relphot/src/reload_catalogs.c
===================================================================
--- trunk/Ohana/src/relphot/src/reload_catalogs.c	(revision 34087)
+++ trunk/Ohana/src/relphot/src/reload_catalogs.c	(revision 34088)
@@ -94,4 +94,11 @@
       catalog.catformat = dvo_catalog_catformat (UPDATE_CATFORMAT);
     }
+
+    struct timeval now;
+    gettimeofday (&now, (void *) NULL);
+    char *moddate = ohana_sec_to_date (now.tv_sec);
+    gfits_modify (&catalog.header, "RELPHOT", "%s", 1, moddate);      
+    free (moddate);
+
     dvo_catalog_save (&catalog, VERBOSE); 
     dvo_catalog_unlock (&catalog);
Index: trunk/Ohana/src/relphot/src/select_images.c
===================================================================
--- trunk/Ohana/src/relphot/src/select_images.c	(revision 34087)
+++ trunk/Ohana/src/relphot/src/select_images.c	(revision 34088)
@@ -256,5 +256,5 @@
     }
     if (RESET) {
-      if (!KEEP_UBERCAL) {
+      if (!KEEP_UBERCAL || !(image[nimage].flags & ID_IMAGE_PHOTOM_UBERCAL)) {
 	image[nimage].Mcal = 0.0;
 	image[nimage].dMcal = NAN;
@@ -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: trunk/Ohana/src/relphot/src/setMrelFinal.c
===================================================================
--- trunk/Ohana/src/relphot/src/setMrelFinal.c	(revision 34087)
+++ trunk/Ohana/src/relphot/src/setMrelFinal.c	(revision 34088)
@@ -166,8 +166,8 @@
 
   /* allow measures from images marked POOR and FEW */
-  if (pass >= 2) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
+  if (pass >= 3) IMAGE_BAD = ID_IMAGE_PHOTOM_NOCAL;
   
   /* allow measures marked as outliers (POOR) and off image region (AREA) */
-  if (pass >= 2) {
+  if (pass >= 3) {
     MEAS_BAD = ID_MEAS_NOCAL | ID_MEAS_SKIP_PHOTOM;
   } else {
@@ -233,5 +233,5 @@
 	}
 
-	// PASS 3 : accept bad measurements (eg, SAT, CR)
+	// PASS 3 : accept bad measurements (eg, SAT, CR), internal outliers
 	if (pass < 3) {
 	  if (catalog[0].measure[m].photFlags & code->photomBadMask) goto skip;
@@ -241,5 +241,5 @@
 	}
 	
-	// PASS 2 : internal outliers accepted
+	// PASS 2 : accept stack measurements
 
 	// PASS 1 : accept poor measurements as well (eg, POOR FIT, etc)
Index: trunk/Ohana/src/skycalc/src/time.c
===================================================================
--- trunk/Ohana/src/skycalc/src/time.c	(revision 34087)
+++ trunk/Ohana/src/skycalc/src/time.c	(revision 34088)
@@ -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: trunk/Ohana/src/tools/src/fhead.c
===================================================================
--- trunk/Ohana/src/tools/src/fhead.c	(revision 34087)
+++ trunk/Ohana/src/tools/src/fhead.c	(revision 34088)
@@ -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: trunk/Ohana/src/tools/src/mktemp.c
===================================================================
--- trunk/Ohana/src/tools/src/mktemp.c	(revision 34087)
+++ trunk/Ohana/src/tools/src/mktemp.c	(revision 34088)
@@ -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: trunk/Ohana/src/uniphot/src/update_dvo_uniphot.c
===================================================================
--- trunk/Ohana/src/uniphot/src/update_dvo_uniphot.c	(revision 34087)
+++ trunk/Ohana/src/uniphot/src/update_dvo_uniphot.c	(revision 34088)
@@ -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;
