yaid.c: Use new mLib function annotations.
authorMark Wooding <mdw@distorted.org.uk>
Sun, 23 Jun 2013 22:25:23 +0000 (23:25 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 29 Jun 2013 00:12:22 +0000 (01:12 +0100)
Update dependency on mLib.

configure.ac
debian/control
yaid.c
yaid.h

index 682cb36..33214ba 100644 (file)
@@ -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--------------------------------------------------------------------------
index f863b26..5b74f5c 100644 (file)
@@ -2,7 +2,7 @@ Source: yaid
 Section: net
 Priority: extra
 Maintainer: Mark Wooding <mdw@distorted.org.uk>
-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 (file)
--- 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 (file)
--- a/yaid.h
+++ b/yaid.h
@@ -67,6 +67,7 @@
 #include <mLib/dstr.h>
 #include <mLib/fdflags.h>
 #include <mLib/fwatch.h>
+#include <mLib/macros.h>
 #include <mLib/mdwopt.h>
 #include <mLib/quis.h>
 #include <mLib/report.h>
@@ -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 --------------------*/