mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
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: Vegard Nossum <vegard.nossum@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
7fa07729e4
commit
fa081b00a8
@ -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); \
|
||||
\
|
||||
|
Loading…
Reference in New Issue
Block a user