Change in libosmocore[master]: Use explicit type-casting in hlist_del() for C++ compatibility

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Dec 5 19:17:05 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/21554 )


Change subject: Use explicit type-casting in hlist_del() for C++ compatibility
......................................................................

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
---
M include/osmocom/core/linuxlist.h
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/54/21554/1

diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index 5ccd462..f28f88b 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)
 {
 	__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.

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/21554
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I75b0a5fe097562007c53987d8d41811e9f35798d
Gerrit-Change-Number: 21554
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201205/bcf5a1b9/attachment.htm>


More information about the gerrit-log mailing list