From 1865f867fbe24ad11351ae2a196f117d8d55d0ca Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Wed, 24 Jun 2020 02:10:58 +0200 Subject: Some more minor warning fixes --- shared/list.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'shared') diff --git a/shared/list.h b/shared/list.h index df4092a..be59dc9 100644 --- a/shared/list.h +++ b/shared/list.h @@ -1,6 +1,11 @@ #ifndef foolisthfoo #define foolisthfoo +/* + * Doubly linked list implementation from the Linux kernel + * Copyright Linus Torvalds et al, GPLv2 +*/ + struct list_head { struct list_head *next; struct list_head *prev; @@ -46,7 +51,7 @@ static inline bool list_empty(struct list_head *list) #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#define container_of(ptr, type, member) ({ \ +#define container_of(ptr, type, member) __extension__ ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) -- cgit v1.2.3