From 9249caf51698a3c867cffd25833b8d700eb939e0 From: Christine Caulfield Date: Mon, 23 Apr 2020 16:28:57 +0000 Subject: [PATCH] list: additional fix list handling for gcc10 --- libqb-1.0.5.orig/include/qb/qblist.h 2020-04-23 10:18:19.992706670 +0100 +++ libqb-1.0.5/include/qb/qblist.h 2020-04-23 10:19:55.704980389 +0100 @@ -28,6 +28,7 @@ /* *INDENT-ON* */ #include +#include #include /** @@ -109,16 +110,16 @@ /** * Replace old entry by new one - * @param old: the element to be replaced - * @param new: the new element to insert + * @param old_one: the element to be replaced + * @param new_one: the new element to insert */ -static inline void qb_list_replace(struct qb_list_head *old, - struct qb_list_head *new) +static inline void qb_list_replace(struct qb_list_head *old_one, + struct qb_list_head *new_one) { - new->next = old->next; - new->next->prev = new; - new->prev = old->prev; - new->prev->next = new; + new_one->next = old_one->next; + new_one->next->prev = new_one; + new_one->prev = old_one->prev; + new_one->prev->next = new_one; } /** @@ -194,7 +195,7 @@ * @param member: the name of the list_struct within the struct. */ #define qb_list_entry(ptr,type,member) ({ \ - ((type *)((void*)ptr - offsetof(type, member))); }) + ((type *)((char*)ptr - offsetof(type, member))); }) /** * Get the first element from a list