From d78627eba607f0a7d5bec90302793b87a9af8338 Mon Sep 17 00:00:00 2001 From: Sebastian Waisbrot Date: Sat, 17 Oct 2015 06:33:21 -0700 Subject: [PATCH] Fix warnings --- src/protocol/memcache/compose.c | 3 ++- src/protocol/memcache/klog.c | 3 ++- src/slimcache/process.c | 4 ++-- src/twemcache/process.c | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/protocol/memcache/compose.c b/src/protocol/memcache/compose.c index 6dfbc8a08..5bd366b7e 100644 --- a/src/protocol/memcache/compose.c +++ b/src/protocol/memcache/compose.c @@ -129,7 +129,8 @@ compose_req(struct buf **buf, struct request *req) struct bstring *key = req->keys->data; int noreply_len = req->noreply * NOREPLY_LEN; int cas_len = (req->type == REQ_CAS) ? CC_UINT64_MAXLEN : 0; - int i, sz, n = 0; + uint32_t i; + int sz, n = 0; switch (type) { case REQ_STATS: diff --git a/src/protocol/memcache/klog.c b/src/protocol/memcache/klog.c index 7323d47d1..87a0cd286 100644 --- a/src/protocol/memcache/klog.c +++ b/src/protocol/memcache/klog.c @@ -112,7 +112,8 @@ static inline void _klog_write_get(struct request *req, struct response *rsp, char *buf, int len) { struct response *nr = rsp; - int i, suffix_len; + int suffix_len; + uint32_t i; struct bstring *key; for (i = 0; i < array_nelem(req->keys); ++i) { diff --git a/src/slimcache/process.c b/src/slimcache/process.c index 4e21bfdb1..b2c5ce2ea 100644 --- a/src/slimcache/process.c +++ b/src/slimcache/process.c @@ -78,7 +78,7 @@ _process_get(struct response *rsp, struct request *req) { struct bstring *key; struct response *r = rsp; - int i; + uint32_t i; INCR(process_metrics, get); /* use chained responses, move to the next response if key is found. */ @@ -109,7 +109,7 @@ _process_gets(struct response *rsp, struct request *req) { struct bstring *key; struct response *r = rsp; - int i; + uint32_t i; INCR(process_metrics, gets); /* use chained responses, move to the next response if key is found. */ diff --git a/src/twemcache/process.c b/src/twemcache/process.c index fb22c3298..ae4c480f5 100644 --- a/src/twemcache/process.c +++ b/src/twemcache/process.c @@ -73,7 +73,7 @@ _process_get(struct response *rsp, struct request *req) { struct bstring *key; struct response *r = rsp; - int i; + uint32_t i; INCR(process_metrics, get); /* use chained responses, move to the next response if key is found. */ @@ -104,7 +104,7 @@ _process_gets(struct response *rsp, struct request *req) { struct bstring *key; struct response *r = rsp; - int i; + uint32_t i; INCR(process_metrics, gets); /* use chained responses, move to the next response if key is found. */