提交 fa081b00 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

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 <johannes@sipsolutions.net>
Acked-by: NVegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 7fa07729
...@@ -145,10 +145,12 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size) ...@@ -145,10 +145,12 @@ static inline bool kmemcheck_is_obj_initialized(unsigned long addr, size_t size)
#define kmemcheck_annotate_bitfield(ptr, name) \ #define kmemcheck_annotate_bitfield(ptr, name) \
do { \ do { \
int _n; \
\
if (!ptr) \ if (!ptr) \
break; \ break; \
\ \
int _n = (long) &((ptr)->name##_end) \ _n = (long) &((ptr)->name##_end) \
- (long) &((ptr)->name##_begin); \ - (long) &((ptr)->name##_begin); \
BUILD_BUG_ON(_n < 0); \ BUILD_BUG_ON(_n < 0); \
\ \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册