From bc23d2c797bd26d221c3668c48bb737108913cab Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sun, 23 Jun 2013 23:25:23 +0100 Subject: [PATCH] yaid.c: Use new mLib function annotations. Update dependency on mLib. --- configure.ac | 2 +- debian/control | 2 +- yaid.c | 5 +++-- yaid.h | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index 682cb36..33214ba 100644 --- a/configure.ac +++ b/configure.ac @@ -45,7 +45,7 @@ AC_CHECK_HEADERS([stdarg.h]) AC_SEARCH_LIBS([socket], [socket]) -PKG_CHECK_MODULES([mLib], [mLib >= 2.1.0]) +PKG_CHECK_MODULES([mLib], [mLib >= 2.2.1]) AM_CFLAGS="$AM_CFLAGS $mLib_CFLAGS" dnl-------------------------------------------------------------------------- diff --git a/debian/control b/debian/control index f863b26..5b74f5c 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: yaid Section: net Priority: extra Maintainer: Mark Wooding -Build-Depends: mlib-dev (>= 2.1.0), debhelper (>= 8), +Build-Depends: mlib-dev (>= 2.2.1), debhelper (>= 8), Standards-Version: 3.1.1 Package: yaid diff --git a/yaid.c b/yaid.c index 232a779..a9793a0 100644 --- a/yaid.c +++ b/yaid.c @@ -298,7 +298,8 @@ static void done_client_write(int err, void *p) /* Format the message FMT and queue it to be sent to the client. Client * input will be disabled until the write completes. */ -static void write_to_client(struct client *c, const char *fmt, ...) +static void PRINTF_LIKE(2, 3) + write_to_client(struct client *c, const char *fmt, ...) { va_list ap; char buf[WRBUFSZ]; @@ -909,7 +910,7 @@ static int make_listening_socket(const struct addrops *ao, int port) } /* Quit because of a fatal signal. */ -static void quit(int sig, void *p) +static void NORETURN quit(int sig, void *p) { const char *signame = p; diff --git a/yaid.h b/yaid.h index a91ea27..0f4efd8 100644 --- a/yaid.h +++ b/yaid.h @@ -67,6 +67,7 @@ #include #include #include +#include #include #include #include @@ -248,8 +249,8 @@ struct query { /* Format and log MSG somewhere sensible, at the syslog(3) priority PRIO. * Prefix it with a description of the query Q, if non-null. */ -extern void logmsg(const struct query */*q*/, - int /*prio*/, const char */*msg*/, ...); +extern void PRINTF_LIKE(3, 4) + logmsg(const struct query */*q*/, int /*prio*/, const char */*msg*/, ...); /*----- System-specific connection identification code --------------------*/ -- 2.11.0