summaryrefslogtreecommitdiff
path: root/util.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-01-13 14:27:48 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-01-13 14:31:54 +0100
commit0028136821365ba0d29332900e8801d94151abc3 (patch)
tree6af9370b8c7a15d52daa96f2102f4c905438cc1c /util.h
parent2ae121c7aa93a0d0cacde7f5818843225ad630d3 (diff)
util: Add printf format GCC attribute to panic() function
This fixes the following GCC warning: util.h:55:2: warning: function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format] Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'util.h')
-rw-r--r--util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/util.h b/util.h
index 0c3d263..1fabd5e 100644
--- a/util.h
+++ b/util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2014-2015 Tobias Klauser <tklauser@distanz.ch>
+ * Copyright (C) 2014-2017 Tobias Klauser <tklauser@distanz.ch>
* Copyright (C) 2009-2012 Daniel Borkmann
*
* This file is part of llmnrd.
@@ -47,6 +47,8 @@
(void) (&_max1 == &_max2); \
_max1 > _max2 ? _max1 : _max2; })
+static inline void panic(const char *fmt, ...) __check_format_printf(1, 2);
+
static inline void __noreturn panic(const char *fmt, ...)
{
va_list vl;