* 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;
* 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;
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");