From: Andrew Morton Date: Tue, 22 Sep 2009 23:43:27 +0000 (-0700) Subject: include/linux/kmemcheck.h: fix a trillion warnings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa081b00a80ef3f4575c99af6e97d29e1628cf51;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git include/linux/kmemcheck.h: fix a trillion warnings of the form include/net/inet_sock.h:208: warning: ISO C90 forbids mixed declarations and code Cc: Johannes Berg Acked-by: Vegard Nossum Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/kmemcheck.h b/include/linux/kmemcheck.h index c8006607f947..136cdcdf92ef 100644 --- a/include/linux/kmemcheck.h +++ b/include/linux/kmemcheck.h @@ -145,10 +145,12 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size) #define kmemcheck_annotate_bitfield(ptr, name) \ do { \ + int _n; \ + \ if (!ptr) \ break; \ \ - int _n = (long) &((ptr)->name##_end) \ + _n = (long) &((ptr)->name##_end) \ - (long) &((ptr)->name##_begin); \ BUILD_BUG_ON(_n < 0); \ \