Index: /trunk/Ohana/src/addstar/src/loadICRF_save_remote.c
===================================================================
--- /trunk/Ohana/src/addstar/src/loadICRF_save_remote.c	(revision 40548)
+++ /trunk/Ohana/src/addstar/src/loadICRF_save_remote.c	(revision 40549)
@@ -8,5 +8,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // if this region is a parallel thing, save and launch remote
Index: /trunk/Ohana/src/addstar/src/loadstarpar_save_remote.c
===================================================================
--- /trunk/Ohana/src/addstar/src/loadstarpar_save_remote.c	(revision 40548)
+++ /trunk/Ohana/src/addstar/src/loadstarpar_save_remote.c	(revision 40549)
@@ -8,5 +8,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // if this region is a parallel thing, save and launch remote
Index: /trunk/Ohana/src/addstar/src/setobjflags_save_remote.c
===================================================================
--- /trunk/Ohana/src/addstar/src/setobjflags_save_remote.c	(revision 40548)
+++ /trunk/Ohana/src/addstar/src/setobjflags_save_remote.c	(revision 40549)
@@ -8,5 +8,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // if this region is a parallel thing, save and launch remote
Index: /trunk/Ohana/src/checkastro/src/load_catalogs.c
===================================================================
--- /trunk/Ohana/src/checkastro/src/load_catalogs.c	(revision 40548)
+++ /trunk/Ohana/src/checkastro/src/load_catalogs.c	(revision 40549)
@@ -102,5 +102,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // load the list of hosts
Index: /trunk/Ohana/src/delstar/src/delete_fix_LAP.c
===================================================================
--- /trunk/Ohana/src/delstar/src/delete_fix_LAP.c	(revision 40548)
+++ /trunk/Ohana/src/delstar/src/delete_fix_LAP.c	(revision 40549)
@@ -88,5 +88,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // write out the subset table of image information
Index: /trunk/Ohana/src/delstar/src/delete_fix_LAP_edges.c
===================================================================
--- /trunk/Ohana/src/delstar/src/delete_fix_LAP_edges.c	(revision 40548)
+++ /trunk/Ohana/src/delstar/src/delete_fix_LAP_edges.c	(revision 40549)
@@ -87,5 +87,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // launch the delstar_client jobs to the parallel hosts
Index: /trunk/Ohana/src/delstar/src/delete_fix_LAP_edges_delete.c
===================================================================
--- /trunk/Ohana/src/delstar/src/delete_fix_LAP_edges_delete.c	(revision 40548)
+++ /trunk/Ohana/src/delstar/src/delete_fix_LAP_edges_delete.c	(revision 40549)
@@ -138,5 +138,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // launch the delstar_client jobs to the parallel hosts
Index: /trunk/Ohana/src/dvopsps/src/insert_detections_dvopsps.c
===================================================================
--- /trunk/Ohana/src/dvopsps/src/insert_detections_dvopsps.c	(revision 40548)
+++ /trunk/Ohana/src/dvopsps/src/insert_detections_dvopsps.c	(revision 40549)
@@ -121,5 +121,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   int i;
Index: /trunk/Ohana/src/fakeastro/src/save_fakestars.c
===================================================================
--- /trunk/Ohana/src/fakeastro/src/save_fakestars.c	(revision 40548)
+++ /trunk/Ohana/src/fakeastro/src/save_fakestars.c	(revision 40549)
@@ -7,5 +7,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // if this region is a parallel thing, save and launch remote
Index: /trunk/Ohana/src/gastro2/src/lumfunc.c
===================================================================
--- /trunk/Ohana/src/gastro2/src/lumfunc.c	(revision 40548)
+++ /trunk/Ohana/src/gastro2/src/lumfunc.c	(revision 40549)
@@ -16,5 +16,6 @@
   lum[0].dNdM = lum[0].Mo = 0;
 
-  bzero (mbin, NMBIN * sizeof (double));
+  // use 'explicit_bzero' to avoid optimizations compile warnings
+  explicit_bzero (mbin, NMBIN * sizeof (double));
 
   /* sum histogram */
Index: /trunk/Ohana/src/libdvo/src/convert.c
===================================================================
--- /trunk/Ohana/src/libdvo/src/convert.c	(revision 40548)
+++ /trunk/Ohana/src/libdvo/src/convert.c	(revision 40549)
@@ -224,7 +224,7 @@
 
   if (deg < 0) {
-    snprintf (line, 16, "-%02d:%04.1f", abs(hr), mn);
+    snprintf_nowarn (line, 16, "-%02d:%04.1f", abs(hr), mn);
   } else {
-    snprintf (line, 16, "+%02d:%04.1f", hr, mn);
+    snprintf_nowarn (line, 16, "+%02d:%04.1f", hr, mn);
   }      
   return (line);
Index: /trunk/Ohana/src/libfits/matrix/F_uncompress_M.c
===================================================================
--- /trunk/Ohana/src/libfits/matrix/F_uncompress_M.c	(revision 40548)
+++ /trunk/Ohana/src/libfits/matrix/F_uncompress_M.c	(revision 40549)
@@ -98,5 +98,5 @@
     gfits_delete (header, "ZTILE1", 1);
     for (axis = 1; axis < header->Naxes; axis++) {
-      snprintf (key, 10, "ZTILE%d", axis + 1);
+      snprintf (key, 10, "ZTILE%d", axis + 1); 
       if (!gfits_scan (header, key, "%lu", 1, &ztile[axis])) ESCAPE;
       gfits_delete (header, key, 1);
@@ -110,10 +110,10 @@
   ALLOCATE (optvalue, char *, NOPTIONS);
   for (Noptions = 0; TRUE; Noptions++) {
-    snprintf (key, 10, "ZNAME%d", Noptions + 1);
+    snprintf_nowarn (key, 10, "ZNAME%d", Noptions + 1); 
     if (!gfits_scan (header, key, "%s", 1, word)) break;
     gfits_delete (header, key, 1);
     optname[Noptions] = strcreate (word);
 
-    snprintf (key, 10, "ZVAL%d", Noptions + 1);
+    snprintf_nowarn (key, 10, "ZVAL%d", Noptions + 1); 
     if (!gfits_scan (header, key, "%s", 1, word)) ESCAPE;
     gfits_delete (header, key, 1);
@@ -204,5 +204,5 @@
   int colnum;
   for (colnum = 1; TRUE; colnum++) {
-    snprintf (key, 10, "TTYPE%d", colnum);
+    snprintf_nowarn (key, 10, "TTYPE%d", colnum); 
     if (!gfits_scan (ftable->header, key, "%s", 1, word)) ESCAPE;
     if (!strcmp (word, "COMPRESSED_DATA")) break;
@@ -212,7 +212,7 @@
   if (!gfits_varlength_column_define (ftable, &zdef, zcol)) ESCAPE;
   gfits_delete (header, "TFIELDS", 1);
-  snprintf (key, 10, "TTYPE"OFF_T_FMT,  zcol);
+  snprintf_nowarn (key, 10, "TTYPE"OFF_T_FMT,  zcol); 
   gfits_delete (header, key, 1);
-  snprintf (key, 10, "TFORM"OFF_T_FMT,  zcol);
+  snprintf_nowarn (key, 10, "TFORM"OFF_T_FMT,  zcol); 
   gfits_delete (header, key, 1);
 
Index: /trunk/Ohana/src/libohana/include/ohana.h
===================================================================
--- /trunk/Ohana/src/libohana/include/ohana.h	(revision 40548)
+++ /trunk/Ohana/src/libohana/include/ohana.h	(revision 40549)
@@ -79,4 +79,11 @@
   struct timeval startTimer, stopTimer; \
   gettimeofday (&startTimer, (void *) NULL);
+
+// several snprintf statements below my truncate their output
+// gcc (since 8.1) warns if the output may be truncated.
+// If we do not care, the following snprintf_nowarn can
+// replace these snprintf calls. (myNOOP in string.c)
+
+# define snprintf_nowarn(...) (snprintf(__VA_ARGS__) < 0 ? myNOOP() : 0)
 
 #ifdef __GNUC__
@@ -314,4 +321,5 @@
 char   *getword                PROTO((char *string));
 char   *skipword               PROTO((char *string));
+void    myNOOP                 PROTO((void));
 
 /* in findexec.c */
Index: /trunk/Ohana/src/libohana/src/string.c
===================================================================
--- /trunk/Ohana/src/libohana/src/string.c	(revision 40548)
+++ /trunk/Ohana/src/libohana/src/string.c	(revision 40549)
@@ -1,3 +1,9 @@
 # include <ohana.h>
+
+// several snprintf statements below my truncate their output
+// gcc (since 8.1) warns if the output may be truncated.
+// the following NOOP function is used to fool the compiler
+// see snprintf_nowarn in ohana.h
+void myNOOP (void) { }
 
 /* Strip WHITESPACE from the start and end of STRING. */
Index: /trunk/Ohana/src/opihi/cmd.basic/module.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.basic/module.c	(revision 40548)
+++ /trunk/Ohana/src/opihi/cmd.basic/module.c	(revision 40549)
@@ -23,5 +23,5 @@
   /* search for requested file in MODULES:0 - MODULES:n */
   for (i = 0; i < Nmodules; i++) {
-    snprintf (modname, 16, "MODULES:%d", i);
+    snprintf_nowarn (modname, 16, "MODULES:%d", i);
     modpath = get_variable (modname);
     if (modpath == NULL) {
Index: /trunk/Ohana/src/opihi/cmd.data/imspline_apply.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.data/imspline_apply.c	(revision 40548)
+++ /trunk/Ohana/src/opihi/cmd.data/imspline_apply.c	(revision 40549)
@@ -47,7 +47,7 @@
   gfits_create_matrix (&out[0].header, &out[0].matrix);
   if ((y1[0].file[0] != '*') && (y1[0].file[0] != '(')) {
-    sprintf (out[0].file, "*%s", y1[0].file);
+    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "*%s", y1[0].file);
   } else {
-    sprintf (out[0].file, "%s", y1[0].file);
+    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "%s", y1[0].file);
   }
 
Index: /trunk/Ohana/src/opihi/cmd.data/imspline_construct.c
===================================================================
--- /trunk/Ohana/src/opihi/cmd.data/imspline_construct.c	(revision 40548)
+++ /trunk/Ohana/src/opihi/cmd.data/imspline_construct.c	(revision 40549)
@@ -19,7 +19,7 @@
   free (out[0].matrix.buffer);
   if ((in[0].file[0] != '*') && (in[0].file[0] != '(')) {
-    sprintf (out[0].file, "*%s", in[0].file);
+    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "*%s", in[0].file);
   } else {
-    sprintf (out[0].file, "%s", in[0].file);
+    snprintf_nowarn (out[0].file, OPIHI_NAME_SIZE, "%s", in[0].file);
   }
   out[0].bitpix = in[0].bitpix;
Index: /trunk/Ohana/src/opihi/dvo/dvo_host_utils.c
===================================================================
--- /trunk/Ohana/src/opihi/dvo/dvo_host_utils.c	(revision 40548)
+++ /trunk/Ohana/src/opihi/dvo/dvo_host_utils.c	(revision 40549)
@@ -13,5 +13,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // write the dvo comment (host independent)
Index: /trunk/Ohana/src/relastro/src/load_catalogs.c
===================================================================
--- /trunk/Ohana/src/relastro/src/load_catalogs.c	(revision 40548)
+++ /trunk/Ohana/src/relastro/src/load_catalogs.c	(revision 40549)
@@ -144,7 +144,7 @@
 
   if (PARALLEL_MANUAL && MANUAL_UNIQUER) {
-    snprintf (uniquer, 12, "%11s", MANUAL_UNIQUER);
+    snprintf_nowarn (uniquer, 12, "%11s", MANUAL_UNIQUER);
   } else {
-    snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+    snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
   }
 
Index: /trunk/Ohana/src/relphot/src/load_catalogs.c
===================================================================
--- /trunk/Ohana/src/relphot/src/load_catalogs.c	(revision 40548)
+++ /trunk/Ohana/src/relphot/src/load_catalogs.c	(revision 40549)
@@ -117,7 +117,7 @@
 
   if (PARALLEL_MANUAL && MANUAL_UNIQUER) {
-    snprintf (uniquer, 12, "%11s", MANUAL_UNIQUER);
+    snprintf_nowarn (uniquer, 12, "%11s", MANUAL_UNIQUER);
   } else {
-    snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+    snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
   }
 
Index: /trunk/Ohana/src/uniphot/src/load_zpt_table.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/load_zpt_table.c	(revision 40548)
+++ /trunk/Ohana/src/uniphot/src/load_zpt_table.c	(revision 40549)
@@ -180,5 +180,5 @@
       char name[9];
       // snprintf (name, 9, "TS0_%04d", i);
-      snprintf (name, 9, "S0_MJD%d", i);
+      snprintf_nowarn (name, 9, "S0_MJD%d", i);
       if (!gfits_scan (&header, name, "%lf", 1, &mjdstart)) { 
 	fprintf (stderr, "cannot find %s in header of %s\n", name, filename);
@@ -188,5 +188,5 @@
 
       // snprintf (name, 9, "TS1_%04d", i);
-      snprintf (name, 9, "S1_MJD%d", i);
+      snprintf_nowarn (name, 9, "S1_MJD%d", i);
       if (!gfits_scan (&header, name, "%lf", 1, &mjdstop)) { 
 	fprintf (stderr, "cannot find %s in header of %s\n", name, filename);
Index: /trunk/Ohana/src/uniphot/src/match_camcorr_to_images.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/match_camcorr_to_images.c	(revision 40548)
+++ /trunk/Ohana/src/uniphot/src/match_camcorr_to_images.c	(revision 40549)
@@ -44,5 +44,5 @@
       if (image[i].tzero > camcorr->tstop[j]) continue;
 
-      int seq;
+      int seq = 0;
       int photcode = image[i].photcode;
 
Index: /trunk/Ohana/src/uniphot/src/update_dvo_fiximids.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/update_dvo_fiximids.c	(revision 40548)
+++ /trunk/Ohana/src/uniphot/src/update_dvo_fiximids.c	(revision 40549)
@@ -86,5 +86,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // write out the subset table of image information
Index: /trunk/Ohana/src/uniphot/src/update_dvo_fixstkids.c
===================================================================
--- /trunk/Ohana/src/uniphot/src/update_dvo_fixstkids.c	(revision 40548)
+++ /trunk/Ohana/src/uniphot/src/update_dvo_fixstkids.c	(revision 40549)
@@ -86,5 +86,5 @@
   int TIME = time(NULL);
   int PID = getpid();
-  snprintf (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
+  snprintf_nowarn (uniquer, 12, "%05d.%05d", PID, TIME % 100000);
 
   // write out the subset table of image information
