Index: /trunk/Ohana/src/addstar/doc/Changes.txt
===================================================================
--- /trunk/Ohana/src/addstar/doc/Changes.txt	(revision 4771)
+++ /trunk/Ohana/src/addstar/doc/Changes.txt	(revision 4772)
@@ -1,2 +1,5 @@
+
+2005.08.15:
+	cleanup of the minor Wall,Werror messages
 
 2005.02.24 : I am adding the mosaic two-level astrometry information to the Image table.
Index: /trunk/Ohana/src/addstar/src/get2mass.c
===================================================================
--- /trunk/Ohana/src/addstar/src/get2mass.c	(revision 4771)
+++ /trunk/Ohana/src/addstar/src/get2mass.c	(revision 4772)
@@ -4,5 +4,5 @@
 Stars *get2mass (GSCRegion *patch, int *NSTARS, int mode) {
   
-  char accel[64], *path;
+  char *path;
   int i, Nstars, Nrefcat, Nregions; 
   Stars     *stars;
@@ -55,5 +55,5 @@
 GSCRegion *get2mass_acc (GSCRegion *patch, int *nregions, char *path, char *accel) {
 
-  int Nregions, NREGIONS, Nrec;
+  int Nregions, NREGIONS;
   GSCRegion *regions;
   char accelfile[1024], line[256], filename[128];
Index: /trunk/Ohana/src/addstar/src/get2mass_as.c
===================================================================
--- /trunk/Ohana/src/addstar/src/get2mass_as.c	(revision 4771)
+++ /trunk/Ohana/src/addstar/src/get2mass_as.c	(revision 4772)
@@ -15,13 +15,12 @@
 Stars *get2mass_AS_data (GSCRegion *region, GSCRegion *patch, int *nstars) {
   
-  int FilterSkip, TimeSkip, Np;
-  int i, Nstars, NSTARS, Nbyte, Nline, Nextra, code, Qentry;
+  int FilterSkip, TimeSkip;
+  int Nstars, NSTARS, Nbyte, Nextra, code, Qentry;
   Stars *stars;
   gzFile gf;
   char qc;
   char *buffer, *filename;
-  char *p, *q, *ptr, *end, *tmp;
-  char line[1000];
-  double RA, DEC, J, H, K, dJ, dH, dK, M, dM;
+  char *p, *q, *ptr, *tmp;
+  double RA, DEC, M, dM;
   double RA0, RA1, DEC0, DEC1;
   e_time time;
@@ -130,5 +129,4 @@
   if (VERBOSE) fprintf (stderr, "\n");
   
-finished:
   gzclose (gf);
   free (buffer);
Index: /trunk/Ohana/src/elixir/include/controller.h
===================================================================
--- /trunk/Ohana/src/elixir/include/controller.h	(revision 4771)
+++ /trunk/Ohana/src/elixir/include/controller.h	(revision 4772)
@@ -170,2 +170,3 @@
 int 	  memstr (char *m1, char *m2, int n);
 int 	  rconnect (char *hostname, char *command, int *rsock, int *wsock);
+void GetConfig (char *config, char *field, char *format, int N, void *ptr);
Index: /trunk/Ohana/src/elixir/src/DefineProcesses.c
===================================================================
--- /trunk/Ohana/src/elixir/src/DefineProcesses.c	(revision 4771)
+++ /trunk/Ohana/src/elixir/src/DefineProcesses.c	(revision 4772)
@@ -3,5 +3,5 @@
 Process **DefineProcesses (Process *global, int *nprocess, char *config) {
 
-  int i, j, status;
+  int i, j;
   char procname[256], entry[256], field[256];
   Process **process;
@@ -22,26 +22,13 @@
   ALLOCATE (global[0].argv[7], char, 256);
   
-  status =  (int) ScanConfig (config, "global.Nargs",   "%d",  0, &global[0].argc);
-  status &= (int) ScanConfig (config, "global.success", "%s",  0, global[0].argv[0]);
-  status &= (int) ScanConfig (config, "global.failure", "%s",  0, global[0].argv[1]);
-  status &= (int) ScanConfig (config, "global.pending", "%s",  0, global[0].argv[2]);
-  status &= (int) ScanConfig (config, "global.logfile", "%s",  0, global[0].argv[3]);
-  status &= (int) ScanConfig (config, "global.source",  "%s",  0, global[0].argv[4]);
-  status &= (int) ScanConfig (config, "global.msg",     "%s",  0, global[0].argv[5]);
-  status &= (int) ScanConfig (config, "global.end",     "%s",  0, global[0].argv[6]);
-  status &= (int) ScanConfig (config, "global.pid",     "%s",  0, global[0].argv[7]);
-  if (!status) { 
-    fprintf (stderr, "missing global entry from config\n");
-    fprintf (stderr, "global.Nargs: %d\n", global[0].argc);
-    fprintf (stderr, "global.argv[0]: %s\n", global[0].argv[0]);
-    fprintf (stderr, "global.argv[1]: %s\n", global[0].argv[1]);
-    fprintf (stderr, "global.argv[2]: %s\n", global[0].argv[2]);
-    fprintf (stderr, "global.argv[3]: %s\n", global[0].argv[3]);
-    fprintf (stderr, "global.argv[4]: %s\n", global[0].argv[4]);
-    fprintf (stderr, "global.argv[5]: %s\n", global[0].argv[5]);
-    fprintf (stderr, "global.argv[6]: %s\n", global[0].argv[6]);
-    fprintf (stderr, "global.argv[7]: %s\n", global[0].argv[7]);
-    Shutdown (1);
-  }
+  GetConfig (config, "global.Nargs",   "%d",  0, &global[0].argc);
+  GetConfig (config, "global.success", "%s",  0, global[0].argv[0]);
+  GetConfig (config, "global.failure", "%s",  0, global[0].argv[1]);
+  GetConfig (config, "global.pending", "%s",  0, global[0].argv[2]);
+  GetConfig (config, "global.logfile", "%s",  0, global[0].argv[3]);
+  GetConfig (config, "global.source",  "%s",  0, global[0].argv[4]);
+  GetConfig (config, "global.msg",     "%s",  0, global[0].argv[5]);
+  GetConfig (config, "global.end",     "%s",  0, global[0].argv[6]);
+  GetConfig (config, "global.pid",     "%s",  0, global[0].argv[7]);
 
   ScanConfig (config, "global.timeout", "%lf", 0, &timeout);
@@ -77,8 +64,5 @@
     /* connect this process success queue */
     sprintf (field, "%s.success", process[i][0].name);
-    if (!ScanConfig (config, field, "%s", 0, entry)) {
-      fprintf (stderr, "missing process.success entry for %s\n", process[i][0].name);
-      Shutdown (1);
-    }
+    GetConfig (config, field, "%s", 0, entry);
     if (!strcasecmp (entry, "global")) {
       process[i][0].success = global[0].success;
@@ -101,8 +85,5 @@
     /* connect this process failure queue */
     sprintf (field, "%s.failure", process[i][0].name);
-    if (!ScanConfig (config, field, "%s", 0, entry)) {
-      fprintf (stderr, "missing process.failure entry for %s\n", process[i][0].name);
-      Shutdown (1);
-    }
+    GetConfig (config, field, "%s", 0, entry);
     if (!strcasecmp (entry, "global")) {
       process[i][0].failure = global[0].failure;
@@ -141,2 +122,14 @@
 
 }
+
+void GetConfig (char *config, char *field, char *format, int N, void *ptr) {
+
+  char *status;
+
+  status = ScanConfig (config, field, format, N, ptr);
+  if (status == NULL) {
+    fprintf (stderr, "error in config, cannot find required field %s\n", field);
+    Shutdown (1);
+  }
+  return;
+}
Index: /trunk/Ohana/src/elixir/src/MachineOps.c
===================================================================
--- /trunk/Ohana/src/elixir/src/MachineOps.c	(revision 4771)
+++ /trunk/Ohana/src/elixir/src/MachineOps.c	(revision 4772)
@@ -410,5 +410,5 @@
 
   fprintf (stderr, "can't find this machine, process combination!\n");
-  fprintf (stderr, "machine: %x, process: %x\n", (unsigned int) machine, (unsigned int) process);
+  fprintf (stderr, "machine: %lx, process: %lx\n", (size_t) machine, (size_t) process);
   return;
 }
@@ -437,5 +437,5 @@
 
   fprintf (stderr, "can't find an active process for this machine!\n");
-  fprintf (stderr, "machine: %x\n", (unsigned int) machine);
+  fprintf (stderr, "machine: %lx\n", (size_t) machine);
 
 }
Index: /trunk/Ohana/src/elixir/src/MsgOps.c
===================================================================
--- /trunk/Ohana/src/elixir/src/MsgOps.c	(revision 4771)
+++ /trunk/Ohana/src/elixir/src/MsgOps.c	(revision 4772)
@@ -36,5 +36,5 @@
   int nbytes, Nbytes, NBYTES;
   char *buffer;
-  int fd, state, mode;
+  int state, mode;
   FILE *f;
 
@@ -76,5 +76,5 @@
   
   mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH;
-  chmod (f, mode);
+  chmod (fifo, mode);
   fclearlockfile (fifo, f, LCK_XCLD, &state);
   
@@ -91,5 +91,5 @@
 int WriteMsg (char *fifo, char *message) {
 
-  int fd, state, mode;
+  int state, mode;
   FILE *f;
 
Index: /trunk/Ohana/src/gastro/src/plotstuff.c
===================================================================
--- /trunk/Ohana/src/gastro/src/plotstuff.c	(revision 4771)
+++ /trunk/Ohana/src/gastro/src/plotstuff.c	(revision 4772)
@@ -62,10 +62,10 @@
   write (Xgraph[N], "DBOX", 4);
   sprintf (buffer, "%f %f %f %f ", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
-  sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
 
   sprintf (buffer, "%s %s %s", "2222", "2222", "2222");
-  sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
@@ -97,5 +97,5 @@
 	   graphmode[0].etype, graphmode[0].color, 
 	   graphmode[0].lweight, graphmode[0].size);
-  sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
@@ -104,5 +104,5 @@
 	   graphmode[0].xmin, graphmode[0].xmax, 
 	   graphmode[0].ymin, graphmode[0].ymax);
-  sprintf (buffer2, "NBYTES: %6d ", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d ", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
Index: /trunk/Ohana/src/gastro2/src/plotstuff.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/plotstuff.c	(revision 4771)
+++ /trunk/Ohana/src/gastro2/src/plotstuff.c	(revision 4772)
@@ -62,10 +62,10 @@
   write (Xgraph[N], "DBOX", 4);
   sprintf (buffer, "%f %f %f %f", graphmode[0].xmin, graphmode[0].xmax, graphmode[0].ymin, graphmode[0].ymax);
-  sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
 
   sprintf (buffer, "%s %s %s", "2222", "2222", "2222");
-  sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
@@ -97,5 +97,5 @@
 	   graphmode[0].etype, graphmode[0].ebar, graphmode[0].color, 
 	   graphmode[0].lweight, graphmode[0].size);
-  sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
@@ -104,5 +104,5 @@
 	   graphmode[0].xmin, graphmode[0].xmax, 
 	   graphmode[0].ymin, graphmode[0].ymax);
-  sprintf (buffer2, "NBYTES: %6d", strlen (buffer));
+  sprintf (buffer2, "NBYTES: %6d", (unsigned int) strlen (buffer));
   write (Xgraph[N], buffer2, 16);
   write (Xgraph[N], buffer, strlen (buffer));
Index: /trunk/Ohana/src/gastro2/src/rfits.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/rfits.c	(revision 4771)
+++ /trunk/Ohana/src/gastro2/src/rfits.c	(revision 4772)
@@ -4,5 +4,4 @@
 
   int i, N, Nstars;
-  Matrix matrix;
   Header theader;
   FTable table;
Index: /trunk/Ohana/src/imregister/imphot/args.c
===================================================================
--- /trunk/Ohana/src/imregister/imphot/args.c	(revision 4771)
+++ /trunk/Ohana/src/imregister/imphot/args.c	(revision 4772)
@@ -95,3 +95,4 @@
     exit (1);
   }
+  return (TRUE);
 }
Index: /trunk/Ohana/src/imregister/src/imstatreg.c
===================================================================
--- /trunk/Ohana/src/imregister/src/imstatreg.c	(revision 4771)
+++ /trunk/Ohana/src/imregister/src/imstatreg.c	(revision 4772)
@@ -1,9 +1,9 @@
 # include "imregister.h"
 # include "imreg.h"
-static char *version = "imstatreg $Revision: 3.13 $";
+static char *version = "imstatreg $Revision: 3.14 $";
 
 int main (int argc, char **argv) {
  
-  int i, child, status;
+  int i, child;
   int *match, Nmatch, Nimage, Nsubset;
   FILE *f;
Index: /trunk/Ohana/src/kapa/graph/LoadObject.c
===================================================================
--- /trunk/Ohana/src/kapa/graph/LoadObject.c	(revision 4771)
+++ /trunk/Ohana/src/kapa/graph/LoadObject.c	(revision 4772)
@@ -174,5 +174,5 @@
   }
   if (Ninpts != Npts*sizeof(float)) {  
-    fprintf (stderr, "error: expected %d bytes, but got only %d\n", Ninpts, Npts*sizeof(float));
+    fprintf (stderr, "error: expected %d bytes, but got only %d\n", Ninpts, (unsigned int)(Npts*sizeof(float)));
     return (FALSE);
   }
Index: /trunk/Ohana/src/libautocode/def/autocode.h
===================================================================
--- /trunk/Ohana/src/libautocode/def/autocode.h	(revision 4771)
+++ /trunk/Ohana/src/libautocode/def/autocode.h	(revision 4772)
@@ -4,3 +4,4 @@
 $STRUCT *fits_table_get_$STRUCT (FTable *table, int *Ndata);
 int      fits_table_set_$STRUCT (FTable *ftable, $STRUCT *data, int Ndata);
+int      fits_table_mkheader_$STRUCT (Header *header);
 int      fits_convert_$STRUCT ($STRUCT *data, int size, int nitems);
Index: /trunk/Ohana/src/misc/src/applyscat.c
===================================================================
--- /trunk/Ohana/src/misc/src/applyscat.c	(revision 4771)
+++ /trunk/Ohana/src/misc/src/applyscat.c	(revision 4772)
@@ -1,3 +1,4 @@
 # include <ohana.h>
+# include <dvo.h>
 # define BYTES_STAR 66
 
Index: /trunk/Ohana/src/misc/src/ftable.c
===================================================================
--- /trunk/Ohana/src/misc/src/ftable.c	(revision 4771)
+++ /trunk/Ohana/src/misc/src/ftable.c	(revision 4772)
@@ -7,4 +7,5 @@
 void list_extnames (char *file);
 void print_layout (Header *header);
+int   ByteSwap (char *ptr, int size, int nitems, char *type);
 int Binary;
 
Index: /trunk/Ohana/src/misc/src/mkfringetable.c
===================================================================
--- /trunk/Ohana/src/misc/src/mkfringetable.c	(revision 4771)
+++ /trunk/Ohana/src/misc/src/mkfringetable.c	(revision 4772)
@@ -1,4 +1,4 @@
 # include <ohana.h>
-static char *version = "mkfringetable $Revision: 1.3 $";
+static char *version = "mkfringetable $Revision: 1.4 $";
 
 void get_version (int argc, char **argv, char *version);
@@ -54,9 +54,9 @@
   }
   status = TRUE;
-  status = status && (int) ScanConfig (layout, "NCCD",    "%d", 1, &Nccd);
-  status = status && (int) ScanConfig (layout, "FILTER",  "%s", 1, filter);
-  status = status && (int) ScanConfig (layout, "CAMERA",  "%s", 1, camera);
-  status = status && (int) ScanConfig (layout, "TVSTOP",  "%s", 1, stop);
-  status = status && (int) ScanConfig (layout, "TVSTART", "%s", 1, start);
+  status = status && (NULL == ScanConfig (layout, "NCCD",    "%d", 1, &Nccd));
+  status = status && (NULL == ScanConfig (layout, "FILTER",  "%s", 1, filter));
+  status = status && (NULL == ScanConfig (layout, "CAMERA",  "%s", 1, camera));
+  status = status && (NULL == ScanConfig (layout, "TVSTOP",  "%s", 1, stop));
+  status = status && (NULL == ScanConfig (layout, "TVSTART", "%s", 1, start));
   if (!status) {
     fprintf (stderr, "error in layout file\n");
Index: /trunk/Ohana/src/mosastro/include/mosastro.h
===================================================================
--- /trunk/Ohana/src/mosastro/include/mosastro.h	(revision 4771)
+++ /trunk/Ohana/src/mosastro/include/mosastro.h	(revision 4772)
@@ -204,2 +204,3 @@
 void wfits (char *filename, SMPData *stars, int Nstars, Header *header);
 int ConvertMatch (MatchData *data, int size, int nitems);
+void SaveResiduals (FILE *f, Header *header);
Index: /trunk/Ohana/src/mosastro/src/match.c
===================================================================
--- /trunk/Ohana/src/mosastro/src/match.c	(revision 4771)
+++ /trunk/Ohana/src/mosastro/src/match.c	(revision 4772)
@@ -6,5 +6,5 @@
   int i, j, k, K, Ntotal;
   int Nmatch, NMATCH;
-  double dp, dq, radius, Radius, exptime;
+  double dp, dq, radius, Radius;
   double *p, *q, *P, *Q;
   int *U, *u;
Index: /trunk/Ohana/src/opihi/pantasks/CheckSystem.c
===================================================================
--- /trunk/Ohana/src/opihi/pantasks/CheckSystem.c	(revision 4771)
+++ /trunk/Ohana/src/opihi/pantasks/CheckSystem.c	(revision 4772)
@@ -6,7 +6,4 @@
 
 int CheckSystem () {
-
-  float dtime;
-  struct timeval now;
 
   gettimeofday (&start, (void *) NULL);
Index: /trunk/Ohana/src/opihi/pclient/ChildOps.c
===================================================================
--- /trunk/Ohana/src/opihi/pclient/ChildOps.c	(revision 4771)
+++ /trunk/Ohana/src/opihi/pclient/ChildOps.c	(revision 4772)
@@ -29,5 +29,4 @@
 
   int Nread;
-  pid_t ppid;
   double dtime;
   struct timeval now;
Index: /trunk/Ohana/src/opihi/pcontrol/CheckHost.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/CheckHost.c	(revision 4771)
+++ /trunk/Ohana/src/opihi/pcontrol/CheckHost.c	(revision 4772)
@@ -3,5 +3,5 @@
 int CheckHost (Host *host) {
   
-  int N, status;
+  int status;
   IOBuffer buffer;
   Job *job;
