diff options
author | Harald Welte <laforge@osmocom.org> | 2020-12-05 20:14:54 +0100 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2020-12-05 20:16:51 +0100 |
commit | 77530b46191d099dbb9434076afa797500fbf874 (patch) | |
tree | e8b9a51c7c0e462107ee39799fd81cc9235bda59 /include/osmocom/core | |
parent | 59e13e4d2548c70b2e1001da24262ef17be8bc0b (diff) |
Use explicit type-casting in hlist_del() for C++ compatibility
/usr/local/include/osmocom/core/linuxlist.h:479:12: error: invalid conversion from ‘void*’ to ‘hlist_node*’ [-fpermissive]
479 | n->next = LLIST_POISON1;
Fixes: I8ef73a62fe9846ce45058eb21cf999dd3eed5741
Change-Id: I75b0a5fe097562007c53987d8d41811e9f35798d
Diffstat (limited to 'include/osmocom/core')
-rw-r--r-- | include/osmocom/core/linuxlist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h index 5ccd462d..f28f88b9 100644 --- a/include/osmocom/core/linuxlist.h +++ b/include/osmocom/core/linuxlist.h @@ -476,8 +476,8 @@ static inline void __hlist_del(struct hlist_node *n) static inline void hlist_del(struct hlist_node *n) { __hlist_del(n); - n->next = LLIST_POISON1; - n->pprev = LLIST_POISON2; + n->next = (struct hlist_node *)LLIST_POISON1; + n->pprev = (struct hlist_node **)LLIST_POISON2; } /*! Delete the specified hlist_node from its list and initialize. |