From: Yann E. MORIN Date: Mon, 29 Apr 2013 17:50:32 +0000 (+0200) Subject: kconfig: fix lists definition for C++ X-Git-Tag: 1.9.9~30 X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=commitdiff_plain;h=b3805f620303ab02d11d1a6df6dd589e8fcd5d39 kconfig: fix lists definition for C++ 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 Signed-off-by: "Yann E. MORIN" Cc: Randy Dunlap Cc: Benjamin Poirier Signed-off-by: Christian Lamparter --- diff --git a/config/list.h b/config/list.h index ea1d581..685d80e 100644 --- a/config/list.h +++ b/config/list.h @@ -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