kconfig: fix lists definition for C++
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 29 Apr 2013 17:50:32 +0000 (19:50 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 31 May 2013 15:56:27 +0000 (17:56 +0200)
The C++ compiler is more strict in that it refuses to assign
a void* to a struct list_head*.

Fix that by explicitly casting the poisonning constants.

(Tested with all 5 frontends, now.)

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Benjamin Poirier <bpoirier@suse.de>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
config/list.h

index ea1d58119d20c291d1f185c33e7cb0036e301112..685d80e1bb0e77de75a97a2ada22991131597b58 100644 (file)
@@ -125,7 +125,7 @@ static inline void __list_del(struct list_head *prev, struct list_head *next)
 static inline void list_del(struct list_head *entry)
 {
        __list_del(entry->prev, entry->next);
-       entry->next = LIST_POISON1;
-       entry->prev = LIST_POISON2;
+       entry->next = (struct list_head*)LIST_POISON1;
+       entry->prev = (struct list_head*)LIST_POISON2;
 }
 #endif