summaryrefslogtreecommitdiffstats
path: root/src/util
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-10-14 10:57:28 +0200
committerJakub Hrozek <jhrozek@redhat.com>2015-01-15 10:30:24 +0100
commite2d36e6f735a1f10cb80726a4691f225e66233ed (patch)
tree4b061fa9bf85b1397aedec593d6d65a4f1e433fc /src/util
parentecf9e7a870945ecfba8eb751d344de3601de9424 (diff)
downloadsssd-e2d36e6f735a1f10cb80726a4691f225e66233ed.tar.gz
sssd-e2d36e6f735a1f10cb80726a4691f225e66233ed.tar.xz
sssd-e2d36e6f735a1f10cb80726a4691f225e66233ed.zip
Fix warning: for loop has empty body
Example of warning: src/ldb_modules/memberof.c:4203:536: error: for loop has empty body [-Werror,-Wempty-body] src/ldb_modules/memberof.c:4203:536: note: put the semicolon on a separate line to silence this warning Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/dlinklist.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/util/dlinklist.h b/src/util/dlinklist.h
index fa4b72255..413084888 100644
--- a/src/util/dlinklist.h
+++ b/src/util/dlinklist.h
@@ -66,7 +66,9 @@ do { \
(p)->next = (p)->prev = NULL; \
} else { \
type tmp; \
- for (tmp = (list); tmp->next; tmp = tmp->next) ; \
+ for (tmp = (list); tmp->next; tmp = tmp->next) { \
+ /* no op */ \
+ } \
tmp->next = (p); \
(p)->next = NULL; \
(p)->prev = tmp; \
@@ -102,7 +104,9 @@ do { \
(list1) = (list2); \
} else { \
type tmp; \
- for (tmp = (list1); tmp->next; tmp = tmp->next) ; \
+ for (tmp = (list1); tmp->next; tmp = tmp->next) { \
+ /* no op */ \
+ } \
tmp->next = (list2); \
if (list2) { \
(list2)->prev = tmp; \
@@ -118,7 +122,9 @@ do { \
DLIST_CONCATENATE(list1, list2, type); \
} else { \
type tmp; \
- for (tmp = (list2); tmp->next; tmp = tmp->next) ; \
+ for (tmp = (list2); tmp->next; tmp = tmp->next) { \
+ /* no op */ \
+ } \
(list2)->prev = (el); \
tmp->next = (el)->next; \
(el)->next = (list2); \