Module Name: src
Committed By: dholland
Date: Mon Sep 5 20:41:59 UTC 2016
Modified Files:
src/lib/librumpuser: sp_common.c
Log Message:
printf functions should be tagged as printf functions. Noticed by
martin, whose build broke for some reason yet to be determined.
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/lib/librumpuser/sp_common.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/librumpuser/sp_common.c
diff -u src/lib/librumpuser/sp_common.c:1.38 src/lib/librumpuser/sp_common.c:1.39
--- src/lib/librumpuser/sp_common.c:1.38 Wed Jan 8 01:45:29 2014
+++ src/lib/librumpuser/sp_common.c Mon Sep 5 20:41:59 2016
@@ -1,4 +1,4 @@
-/* $NetBSD: sp_common.c,v 1.38 2014/01/08 01:45:29 pooka Exp $ */
+/* $NetBSD: sp_common.c,v 1.39 2016/09/05 20:41:59 dholland Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -60,14 +60,17 @@
* XXX: NetBSD's __unused collides with Linux headers, so we cannot
* define it before we've included everything.
*/
-#if !defined(__unused) && defined(__GNUC__)
+#if !defined(__unused) && (defined(__clang__) || defined(__GNUC__))
#define __unused __attribute__((__unused__))
#endif
+#if !defined(__printflike) && (defined(__clang__) || defined(__GNUC__))
+#define __printflike(a,b) __attribute__((__format__(__printf__, a, b))))
+#endif
//#define DEBUG
#ifdef DEBUG
#define DPRINTF(x) mydprintf x
-static void
+static __printflike(1, 2) void
mydprintf(const char *fmt, ...)
{
va_list ap;