From 2a0d2a8e11adfde412a8b70c4fdafa607e84c670 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 28 Sep 2014 20:51:43 +0100 Subject: include: fix compiler warnings This change has motivation to make -Wall -pedantic compiler options to spit a little bit less noise, which with luck will increase change to notice real issues. Multiple of these: warning: ISO C forbids braced-groups within expressions [-Wpedantic] And nearly 300 times reported: include/c.h:75:41: warning: struct has no named members [-Wpedantic] #define UL_BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) Signed-off-by: Sami Kerola --- include/list.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/list.h') diff --git a/include/list.h b/include/list.h index cfbdb16ee..3c08aa5f2 100644 --- a/include/list.h +++ b/include/list.h @@ -166,7 +166,7 @@ _INLINE_ void list_splice(struct list_head *list, struct list_head *head) * @type: the type of the struct this is embedded in. * @member: the name of the list_struct within the struct. */ -#define list_entry(ptr, type, member) ({ \ +#define list_entry(ptr, type, member) __extension__ ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) -- cgit v1.2.3-55-g7522