1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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

This reverts commit 7c9505e651.

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:57:32 +02:00 committed by Jeremy Allison
parent 91a17e5413
commit f061cccd0a

View File

@ -83,9 +83,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; \
@ -97,7 +94,6 @@ do { \
if ((p)->next) (p)->next->prev = (p)->prev; \
} \
if ((p) != (list)) (p)->next = (p)->prev = NULL; \
_Pragma ("GCC diagnostic pop") \
} while (0)
/*
@ -128,11 +124,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)