diff options
author | Ira Cooper <ira@samba.org> | 2016-07-13 12:37:19 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-07-14 05:44:20 +0200 |
commit | 7c9505e651287c5d4747b222af1fda970c562a00 (patch) | |
tree | 8b3ebfca4a60e7fff963c57f32a03b489ffa4849 /lib/ldb | |
parent | 2991f7709973fdcc2c0b83bbe15dda3f1ceae9b3 (diff) | |
download | samba-7c9505e651287c5d4747b222af1fda970c562a00.tar.gz |
ldb:dlinklist: avoid -Wtautological-compare errors with gcc6
We expect these macros to generate tautological compares
intentionally, so disabling the warning is just fine.
This lets --pick-developer work with gcc6 and newer.
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 14 05:44:21 CEST 2016 on sn-devel-144
Diffstat (limited to 'lib/ldb')
-rw-r--r-- | lib/ldb/include/dlinklist.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ldb/include/dlinklist.h b/lib/ldb/include/dlinklist.h index ef01aec9f1c..ca76794d6d2 100644 --- a/lib/ldb/include/dlinklist.h +++ b/lib/ldb/include/dlinklist.h @@ -83,6 +83,9 @@ 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; \ @@ -94,6 +97,7 @@ do { \ if ((p)->next) (p)->next->prev = (p)->prev; \ } \ if ((p) != (list)) (p)->next = (p)->prev = NULL; \ + _Pragma ("GCC diagnostic pop") \ } while (0) /* @@ -124,7 +128,11 @@ 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) |