[dm-devel] [PATCH 49/72] libmultipath: vector_for_each_slot: fix -Wsign-compare warnings
Martin Wilck
Martin.Wilck at suse.com
Sat Oct 12 21:28:38 UTC 2019
From: Martin Wilck <mwilck at suse.com>
Signed-off-by: Martin Wilck <mwilck at suse.com>
---
libmultipath/vector.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/vector.h b/libmultipath/vector.h
index 344dffd5..e16ec461 100644
--- a/libmultipath/vector.h
+++ b/libmultipath/vector.h
@@ -36,9 +36,9 @@ typedef struct _vector *vector;
#define VECTOR_LAST_SLOT(V) (((V) && VECTOR_SIZE(V) > 0) ? (V)->slot[(VECTOR_SIZE(V) - 1)] : NULL)
#define vector_foreach_slot(v,p,i) \
- for (i = 0; (v) && i < VECTOR_SIZE(v) && ((p) = (v)->slot[i]); i++)
+ for (i = 0; (v) && (int)i < VECTOR_SIZE(v) && ((p) = (v)->slot[i]); i++)
#define vector_foreach_slot_after(v,p,i) \
- for (; (v) && i < VECTOR_SIZE(v) && ((p) = (v)->slot[i]); i++)
+ for (; (v) && (int)i < VECTOR_SIZE(v) && ((p) = (v)->slot[i]); i++)
#define vector_foreach_slot_backwards(v,p,i) \
for (i = VECTOR_SIZE(v) - 1; (int)i >= 0 && ((p) = (v)->slot[i]); i--)
--
2.23.0
More information about the dm-devel
mailing list