chiark
/
gitweb
/
~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use the shiny new `mLib' warning-control macros.
[catacomb]
/
progs
/
pixie.c
diff --git
a/progs/pixie.c
b/progs/pixie.c
index 667a588c3bc3908be5dfc2a153f2f4b818ffb649..c501236fd5b1facfb2a3ecf826839df8a86e01de 100644
(file)
--- a/
progs/pixie.c
+++ b/
progs/pixie.c
@@
-96,7
+96,7
@@
static unsigned flags = 0;
* Use: Writes out a timestamped log message.
*/
* 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;
{
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.
*/
* 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;
{
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);
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");
}
}
pixserv_write(px, "OK\n");