summaryrefslogtreecommitdiff
path: root/shared
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-24 02:10:58 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-24 02:10:58 +0200
commit1865f867fbe24ad11351ae2a196f117d8d55d0ca (patch)
tree0d620cbe09842331003aa0b4f709c26c59064a10 /shared
parentca3b221b96a4d621c75f1e62aea74d6d83cadcd8 (diff)
Some more minor warning fixes
Diffstat (limited to 'shared')
-rw-r--r--shared/list.h7
1 files changed, 6 insertions, 1 deletions
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) );})