From 95f1cd6ea87abd18b4a1bafa79a925937cbf6d41 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sun, 5 Nov 2017 06:54:31 +0800 Subject: [PATCH] WITH_STATS: fix signed build warnings --- lib/libwebsockets.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libwebsockets.c b/lib/libwebsockets.c index 04f6de19..c371ad95 100644 --- a/lib/libwebsockets.c +++ b/lib/libwebsockets.c @@ -2968,8 +2968,9 @@ lws_stats_log_dump(struct lws_context *context) #if defined(LWS_WITH_PEER_LIMITS) m = 0; - for (n = 0; n < context->pl_hash_elements; n++) { - lws_start_foreach_llp(struct lws_peer **, peer, context->pl_hash_table[n]) { + for (n = 0; n < (int)context->pl_hash_elements; n++) { + lws_start_foreach_llp(struct lws_peer **, peer, + context->pl_hash_table[n]) { m++; } lws_end_foreach_llp(peer, next); } @@ -2981,7 +2982,7 @@ lws_stats_log_dump(struct lws_context *context) } if (m) { - for (n = 0; n < context->pl_hash_elements; n++) { + for (n = 0; n < (int)context->pl_hash_elements; n++) { char buf[72]; lws_start_foreach_llp(struct lws_peer **, peer, context->pl_hash_table[n]) {