Index: /branches/eam_branches/ohana.20160226/src/addstar/src/ConfigInit.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/ConfigInit.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/ConfigInit.c	(revision 39416)
@@ -224,5 +224,5 @@
 
   /* get detection filtering mask */
-  if (!ScanConfig (config, "DETECTIONFILTER", "%d", 0, &options.detectionFilter)) {
+  if (!ScanConfig (config, "DETECTIONFILTER", "%u", 0, &options.detectionFilter)) {
       options.detectionFilter = 0;
   }
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/LoadDataSDSS.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/LoadDataSDSS.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/LoadDataSDSS.c	(revision 39416)
@@ -5,4 +5,5 @@
 // each SDSS data set corresponds to 5 images (ugriz)
 Catalog *LoadDataSDSS (FILE *f, char *imagename, Image **images, off_t *nvalid, Header **headers, off_t *extsize, HeaderSet *headerSets, off_t Nimages) {
+  OHANA_UNUSED_PARAM(Nimages);
 
   off_t Nskip, Nvalid, NVALID;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/ReadImageHeader.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/ReadImageHeader.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/ReadImageHeader.c	(revision 39416)
@@ -209,5 +209,5 @@
   }
 
-  if (!gfits_scan (header, ImageIDKeyword, "%d", 1, &image[0].externID)) {
+  if (!gfits_scan (header, ImageIDKeyword, "%u", 1, &image[0].externID)) {
     image[0].externID = 0;
   }
@@ -272,5 +272,5 @@
 
   /* find expected number of stars */
-  if (!gfits_scan (header, "NSTARS", "%d", 1, &image[0].nstar) && !NO_STARS) {
+  if (!gfits_scan (header, "NSTARS", "%u", 1, &image[0].nstar) && !NO_STARS) {
     fprintf (stderr, "WARNING: can't get NSTARS from header (TEXT mode will be invalid)\n");
   }
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/ReadStarsFITS.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/ReadStarsFITS.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/ReadStarsFITS.c	(revision 39416)
@@ -43,4 +43,5 @@
 // corresponding image header, load the stars from the table
 Catalog *ReadStarsFITS (FILE *f, Header *header, Header *in_theader) {
+  OHANA_UNUSED_PARAM(header);
 
   off_t Nskip;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/SkyRegionUtils.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/SkyRegionUtils.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/SkyRegionUtils.c	(revision 39416)
@@ -2,4 +2,5 @@
 
 SkyList *SkyListExistingSubset (SkyList *input, char *path) {
+  OHANA_UNUSED_PARAM(path);
   
   int i, status, Nsubset, NSUBSET;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/build_links.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/build_links.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/build_links.c	(revision 39416)
@@ -27,4 +27,5 @@
    not partial, and has a correct set of average[].measureOffset,Nmeasure values */
 off_t *init_measure_links (Average *average, off_t Naverage, Measure *measure, off_t Nmeasure) {
+  OHANA_UNUSED_PARAM(measure);
 
   off_t i, j, N;
@@ -161,4 +162,5 @@
 /* build the initial links assuming the table is sorted */
 off_t *init_missing_links (Average *average, off_t Naverage, Missing *missing, off_t Nmissing) {
+  OHANA_UNUSED_PARAM(missing);
 
   off_t i, j, N;
@@ -229,4 +231,5 @@
    not partial, and has a correct set of average[].lensingOffset,Nlensing values */
 off_t *init_lensing_links (Average *average, off_t Naverage, Lensing *lensing, off_t Nlensing) {
+  OHANA_UNUSED_PARAM(lensing);
 
   off_t i, j, N;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/calibrate.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/calibrate.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/calibrate.c	(revision 39416)
@@ -157,5 +157,7 @@
   /* create a hash array from Nstar[] entries */
   ALLOCATE (Nlist, int, MaxN + 1);
-  memset (Nlist, 0, MAX (0, MaxN*sizeof(int)));
+  if (MaxN >= 0) {
+    memset (Nlist, 0, sizeof(int));
+  }
   for (i = 0; i < Ncal; i++) {
     Nlist[Nstar[i]] ++;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/greference.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/greference.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/greference.c	(revision 39416)
@@ -4,4 +4,5 @@
 
 Catalog *greference (char *Refcat, SkyRegion *region, int photcode) {
+  OHANA_UNUSED_PARAM(photcode);
 
   Catalog *catalog = NULL;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/loadgalphot_table.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/loadgalphot_table.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/loadgalphot_table.c	(revision 39416)
@@ -3,4 +3,5 @@
 
 int loadgalphot_table (SkyList *skylistInput, HostTable *hosts, char *filename, AddstarClientOptions *options) {
+  OHANA_UNUSED_PARAM(hosts);
   
   int i, Nstars;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/loadsupercos_rawdata.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/loadsupercos_rawdata.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/loadsupercos_rawdata.c	(revision 39416)
@@ -7,4 +7,5 @@
 
 int loadsupercos_rawdata (Image *image, int *imlist, int Nimage, SkyTable *skytable, char *filename, AddstarClientOptions options) {
+  OHANA_UNUSED_PARAM(Nimage);
   
   int i;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/mkcmf.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/mkcmf.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/mkcmf.c	(revision 39416)
@@ -1368,4 +1368,5 @@
 
 int WriteXSRCtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars, float zeroPt, float exptime) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i, j;
@@ -1527,4 +1528,5 @@
 
 int WriteXFITtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i;
@@ -1688,4 +1690,5 @@
 
 int WriteXGALtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i;
@@ -1804,4 +1807,5 @@
 
 int WriteXRADtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars, int Nrad) {
+  OHANA_UNUSED_PARAM(Flag);
 
   int i, j, k;
@@ -1881,4 +1885,9 @@
 
 int WriteDETFtable (FILE *fits, char *extroot, double *X, double *Y, double *M, unsigned int *Flag, int Nstars) {
+  OHANA_UNUSED_PARAM(X);
+  OHANA_UNUSED_PARAM(Y);
+  OHANA_UNUSED_PARAM(M);
+  OHANA_UNUSED_PARAM(Flag);
+  OHANA_UNUSED_PARAM(Nstars);
 
   int i;
Index: /branches/eam_branches/ohana.20160226/src/addstar/src/sky_tessalation.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/addstar/src/sky_tessalation.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/addstar/src/sky_tessalation.c	(revision 39416)
@@ -202,4 +202,6 @@
 // for local projects such as the PS1 Medium Deep fields
 int sky_tessellation_local (FITS_DB *db, int level, int Nmax) {
+  OHANA_UNUSED_PARAM(level);
+  OHANA_UNUSED_PARAM(Nmax);
 
   int Nimage;
@@ -239,4 +241,6 @@
 // we generate projects on uniform rings of constant dec height
 int sky_tessellation_rings (FITS_DB *db, int level, int Nmax) {
+  OHANA_UNUSED_PARAM(level);
+  OHANA_UNUSED_PARAM(Nmax);
 
   int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
@@ -294,4 +298,6 @@
 // based on code supplied by Tamas 2012.07.23
 int sky_tessellation_tamas (FITS_DB *db, int level, int Nmax) {
+  OHANA_UNUSED_PARAM(level);
+  OHANA_UNUSED_PARAM(Nmax);
 
   int j, nDEC, Nimage, Nring, Ntotal, Ndigit;
@@ -740,4 +746,5 @@
 // format : guide to generate the filenames (c-type string format)
 SkyRectangle *sky_rectangle_tamas (double *Dec, double dm, double halfa, double halftheta, int *nring, char *format) {
+  OHANA_UNUSED_PARAM(halfa);
 
   static int Nname = 0;
Index: /branches/eam_branches/ohana.20160226/src/delstar/src/delete_duplicate_images.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/delstar/src/delete_duplicate_images.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/delstar/src/delete_duplicate_images.c	(revision 39416)
@@ -630,4 +630,5 @@
 
 off_t find_obstime_range (Image *image, off_t Nimage, off_t firstEntry) {
+  OHANA_UNUSED_PARAM(image);
 
   Nsubset = 0;
Index: /branches/eam_branches/ohana.20160226/src/delstar/src/delete_fix_LAP.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/delstar/src/delete_fix_LAP.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/delstar/src/delete_fix_LAP.c	(revision 39416)
@@ -465,4 +465,5 @@
 
 int delete_fix_LAP_measures (off_t *measureDrop, Catalog *catalog, ImageSubset *image, off_t Nimage) {
+  OHANA_UNUSED_PARAM(Nimage);
 
   /* internal counters */
Index: /branches/eam_branches/ohana.20160226/src/delstar/src/find_image_db.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/delstar/src/find_image_db.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/delstar/src/find_image_db.c	(revision 39416)
@@ -83,6 +83,6 @@
 
   for (i = 0; i < Nimage; i++) {
-    if (image[i].tzero < START) continue;
-    if (image[i].tzero > END) continue;
+    if (image[i].tzero < start) continue;
+    if (image[i].tzero > end) continue;
     if (code != NULL) {
       if (image[i].photcode != code[0].code) continue;
Index: /branches/eam_branches/ohana.20160226/src/delstar/src/gimages.c
===================================================================
--- /branches/eam_branches/ohana.20160226/src/delstar/src/gimages.c	(revision 39415)
+++ /branches/eam_branches/ohana.20160226/src/delstar/src/gimages.c	(revision 39416)
@@ -46,13 +46,13 @@
  
   /* get other header info */
-  haveNx = gfits_scan (&header, "NAXIS1",   "%hd", 1, &image[0].NX); 
-  haveNy = gfits_scan (&header, "NAXIS2",   "%hd", 1, &image[0].NY);
+  haveNx = gfits_scan (&header, "NAXIS1",   "%hu", 1, &image[0].NX); 
+  haveNy = gfits_scan (&header, "NAXIS2",   "%hu", 1, &image[0].NY);
   if (!haveNx && !haveNy) {
-      haveNx = gfits_scan (&header, "IMNAXIS1",   "%hd", 1, &image[0].NX); 
-      haveNy = gfits_scan (&header, "IMNAXIS2",   "%hd", 1, &image[0].NY);
+      haveNx = gfits_scan (&header, "IMNAXIS1",   "%hu", 1, &image[0].NX); 
+      haveNy = gfits_scan (&header, "IMNAXIS2",   "%hu", 1, &image[0].NY);
   }      
   if (!haveNx && !haveNy) {
-      haveNx = gfits_scan (&header, "ZNAXIS1",   "%hd", 1, &image[0].NX);
-      haveNy = gfits_scan (&header, "ZNAXIS2",   "%hd", 1, &image[0].NY);
+      haveNx = gfits_scan (&header, "ZNAXIS1",   "%hu", 1, &image[0].NX);
+      haveNy = gfits_scan (&header, "ZNAXIS2",   "%hu", 1, &image[0].NY);
   }
   if (!haveNx || !haveNy) {
