X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/9b1663a5574182a66c6de8ad2fce7b3e4cbf277b..23bbea75793621e6b21fbb13c00d8223113cf7b5:/progs/pixie.c diff --git a/progs/pixie.c b/progs/pixie.c index 667a588..c501236 100644 --- a/progs/pixie.c +++ b/progs/pixie.c @@ -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");