Index: trunk/Ohana/src/addstar/src/ConfigInit.c
===================================================================
--- trunk/Ohana/src/addstar/src/ConfigInit.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/ConfigInit.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/LoadDataSDSS.c
===================================================================
--- trunk/Ohana/src/addstar/src/LoadDataSDSS.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/LoadDataSDSS.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/ReadImageHeader.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/ReadImageHeader.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/ReadStarsFITS.c
===================================================================
--- trunk/Ohana/src/addstar/src/ReadStarsFITS.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/ReadStarsFITS.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/SkyRegionUtils.c
===================================================================
--- trunk/Ohana/src/addstar/src/SkyRegionUtils.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/SkyRegionUtils.c	(revision 39457)
@@ -2,4 +2,5 @@
 
 SkyList *SkyListExistingSubset (SkyList *input, char *path) {
+  OHANA_UNUSED_PARAM(path);
   
   int i, status, Nsubset, NSUBSET;
Index: trunk/Ohana/src/addstar/src/build_links.c
===================================================================
--- trunk/Ohana/src/addstar/src/build_links.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/build_links.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/calibrate.c
===================================================================
--- trunk/Ohana/src/addstar/src/calibrate.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/calibrate.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/greference.c
===================================================================
--- trunk/Ohana/src/addstar/src/greference.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/greference.c	(revision 39457)
@@ -4,4 +4,5 @@
 
 Catalog *greference (char *Refcat, SkyRegion *region, int photcode) {
+  OHANA_UNUSED_PARAM(photcode);
 
   Catalog *catalog = NULL;
Index: trunk/Ohana/src/addstar/src/loadgalphot_table.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadgalphot_table.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/loadgalphot_table.c	(revision 39457)
@@ -3,4 +3,5 @@
 
 int loadgalphot_table (SkyList *skylistInput, HostTable *hosts, char *filename, AddstarClientOptions *options) {
+  OHANA_UNUSED_PARAM(hosts);
   
   int i, Nstars;
Index: trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c
===================================================================
--- trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/loadsupercos_rawdata.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/mkcmf.c
===================================================================
--- trunk/Ohana/src/addstar/src/mkcmf.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/mkcmf.c	(revision 39457)
@@ -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: trunk/Ohana/src/addstar/src/sky_tessalation.c
===================================================================
--- trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 39405)
+++ trunk/Ohana/src/addstar/src/sky_tessalation.c	(revision 39457)
@@ -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;
