1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

Revert "lib:dlinklist: avoid -Wtautological-compare errors with gcc6"

This reverts commit 5d85fd85467eb1f8941641d5f71d75e7d5c7234c.

Breaks compile for older (<= 4.4) gccs.
Needs to be done differently.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Michael Adam 2016-07-14 09:58:28 +02:00 committed by Jeremy Allison
parent ff5521838a
commit a751b978a8

View File

@ -79,9 +79,6 @@ do { \
*/
#define DLIST_REMOVE(list, p) \
do { \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wpragmas\"") \
_Pragma ("GCC diagnostic ignored \"-Wtautological-compare\"") \
if ((p) == (list)) { \
if ((p)->next) (p)->next->prev = (p)->prev; \
(list) = (p)->next; \
@ -93,7 +90,6 @@ do { \
if ((p)->next) (p)->next->prev = (p)->prev; \
} \
if ((p) != (list)) (p)->next = (p)->prev = NULL; \
_Pragma ("GCC diagnostic pop") \
} while (0)
/*
@ -124,11 +120,7 @@ do { \
(p)->next = (el)->next; \
(el)->next = (p); \
if ((p)->next) (p)->next->prev = (p); \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wpragmas\"") \
_Pragma ("GCC diagnostic ignored \"-Wtautological-compare\"") \
if ((list)->prev == (el)) (list)->prev = (p); \
_Pragma ("GCC diagnostic pop") \
}\
} while (0)