From 746a2a838deec3ef86ef6b7c3edd4207b9a351aa Mon Sep 17 00:00:00 2001 From: KOSAKI Motohiro Date: Tue, 24 May 2011 17:13:17 -0700 Subject: sparse: Undef __compiletime_{warning,error} if __CHECKER__ is defined sparse can't parse warning and error attribute. then they should be hidden from sparse. Signed-off-by: KOSAKI Motohiro Cc: Arjan van de Ven Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/compiler-gcc4.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/compiler-gcc4.h') diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 64b7c003fd7..dfadc96e9d6 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h @@ -51,7 +51,7 @@ #if __GNUC_MINOR__ > 0 #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) #endif -#if __GNUC_MINOR__ >= 4 +#if __GNUC_MINOR__ >= 4 && !defined(__CHECKER__) #define __compiletime_warning(message) __attribute__((warning(message))) #define __compiletime_error(message) __attribute__((error(message))) #endif -- cgit v1.2.3-70-g09d2