diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-01-13 14:27:48 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2017-01-13 14:31:54 +0100 |
commit | 0028136821365ba0d29332900e8801d94151abc3 (patch) | |
tree | 6af9370b8c7a15d52daa96f2102f4c905438cc1c /compiler.h | |
parent | 2ae121c7aa93a0d0cacde7f5818843225ad630d3 (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 'compiler.h')
-rw-r--r-- | compiler.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,5 +1,5 @@ /* - * Copyright (C) 2015 Tobias Klauser <tklauser@distanz.ch> + * Copyright (C) 2015-2017 Tobias Klauser <tklauser@distanz.ch> * * This file is part of llmnrd. * @@ -28,6 +28,10 @@ # ifndef __unused # define __unused __attribute__((unused)) # endif +# ifndef __check_format_printf +# define __check_format_printf(__fmt, __args) \ + __attribute__ ((format (printf, (__fmt), (__args)))) +# endif # ifndef offsetof # define offsetof(a, b) __builtin_offsetof(a, b) # endif |