Use the shiny new `mLib' warning-control macros.
[u/mdw/catacomb] / progs / pixie.c
index 667a588..c501236 100644 (file)
@@ -96,7 +96,7 @@ static unsigned flags = 0;
  * Use:                Writes out a timestamped log message.
  */
 
-static void pxlog(const char *p, ...)
+static void PRINTF_LIKE(1, 2) pxlog(const char *p, ...)
 {
   dstr d = DSTR_INIT;
   va_list ap;
@@ -592,7 +592,7 @@ static void pixserv_expire(struct timeval *tv, void *p)
  * Use:                Formats a string and emits it to the output file.
  */
 
-static void pixserv_write(pixserv *px, const char *p, ...)
+static void PRINTF_LIKE(2, 3) pixserv_write(pixserv *px, const char *p, ...)
 {
   dstr d = DSTR_INIT;
   va_list ap;
@@ -706,7 +706,7 @@ OK\n\
        struct timeval tv;
        gettimeofday(&tv, 0);
        TV_SUB(&tv, &p->timer.tv, &tv);
-       pixserv_write(px, "ITEM %s %i\n", p->tag, tv.tv_sec);
+       pixserv_write(px, "ITEM %s %lu\n", p->tag, (unsigned long)tv.tv_sec);
       }
     }
     pixserv_write(px, "OK\n");