Module Name: src
Committed By: joerg
Date: Tue Jan 7 02:09:01 UTC 2014
Modified Files:
src/external/bsd/libevent/dist: log-internal.h log.c
Log Message:
Add format string checks for _warn_helper.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/libevent/dist/log-internal.h
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/libevent/dist/log.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/libevent/dist/log-internal.h
diff -u src/external/bsd/libevent/dist/log-internal.h:1.2 src/external/bsd/libevent/dist/log-internal.h:1.3
--- src/external/bsd/libevent/dist/log-internal.h:1.2 Thu Apr 11 16:56:41 2013
+++ src/external/bsd/libevent/dist/log-internal.h Tue Jan 7 02:09:01 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: log-internal.h,v 1.2 2013/04/11 16:56:41 christos Exp $ */
+/* $NetBSD: log-internal.h,v 1.3 2014/01/07 02:09:01 joerg Exp $ */
/*
* Copyright (c) 2000-2007 Niels Provos <[email protected]>
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
@@ -31,7 +31,7 @@
#include "event2/util.h"
#ifdef __GNUC__
-#define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b)))
+#define EV_CHECK_FMT(a,b) __attribute__((__format__(__printf__, a, b)))
#define EV_NORETURN __attribute__((noreturn))
#else
#define EV_CHECK_FMT(a,b)
@@ -55,6 +55,4 @@ void _event_debugx(const char *fmt, ...)
#define event_debug(x) do {;} while (/*CONSTCOND*/0)
#endif
-#undef EV_CHECK_FMT
-
#endif
Index: src/external/bsd/libevent/dist/log.c
diff -u src/external/bsd/libevent/dist/log.c:1.1.1.2 src/external/bsd/libevent/dist/log.c:1.2
--- src/external/bsd/libevent/dist/log.c:1.1.1.2 Thu Apr 11 16:43:26 2013
+++ src/external/bsd/libevent/dist/log.c Tue Jan 7 02:09:01 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: log.c,v 1.1.1.2 2013/04/11 16:43:26 christos Exp $ */
+/* $NetBSD: log.c,v 1.2 2014/01/07 02:09:01 joerg Exp $ */
/* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */
/*
@@ -40,7 +40,7 @@
#include "event2/event-config.h"
#include <sys/cdefs.h>
-__RCSID("$NetBSD: log.c,v 1.1.1.2 2013/04/11 16:43:26 christos Exp $");
+__RCSID("$NetBSD: log.c,v 1.2 2014/01/07 02:09:01 joerg Exp $");
#ifdef WIN32
#include <winsock2.h>
@@ -60,7 +60,7 @@ __RCSID("$NetBSD: log.c,v 1.1.1.2 2013/0
#include "log-internal.h"
static void _warn_helper(int severity, const char *errstr, const char *fmt,
- va_list ap);
+ va_list ap) EV_CHECK_FMT(3, 0);
static void event_log(int severity, const char *msg);
static void event_exit(int errcode) EV_NORETURN;