From a20611d4357c3c3ebe0a62776a1642e7904c1410 Mon Sep 17 00:00:00 2001 From: Robin Sonefors Date: Tue, 29 Jan 2013 15:08:44 +0100 Subject: check_snmp: Close potential for using uninitialized memory This was reported by clang, and in order for it to understand attributes properly, I had to modify the macro that checks for non-gcc compilers. Signed-off-by: Robin Sonefors --- plugins/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/common.h') diff --git a/plugins/common.h b/plugins/common.h index c0dc2f41..f024b2ae 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -208,9 +208,9 @@ enum { # define bindtextdomain(Domainname, Dirname) /* empty */ #endif -/* For non-GNU compilers to ignore __attribute__ */ -#ifndef __GNUC__ -# define __attribute__(x) /* do nothing */ +/* For non-GNU/non-clang compilers to ignore __attribute__ */ +#if !defined(__GNUC__) && !defined(__CLANG__) +# define __attribute__(noreturn) /* do nothing */ #endif #endif /* _COMMON_H_ */ -- cgit v1.2.3