include/linux/kmemcheck.h: fix a trillion warnings
authorAndrew Morton <akpm@linux-foundation.org>
Tue, 22 Sep 2009 23:43:27 +0000 (16:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:27 +0000 (07:39 -0700)
of the form

include/net/inet_sock.h:208: warning: ISO C90 forbids mixed declarations and code

Cc: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/kmemcheck.h

index c800660..136cdcd 100644 (file)
@@ -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);                                   \
                                                                        \