[Sheepdog] [PATCH] fix a compiler warning in forward_write_obj_req

Christoph Hellwig hch at infradead.org
Mon Nov 14 16:45:33 CET 2011


rlen is never used in the function, and recent gcc complains about
this fact.

Signed-off-by: Christoph Hellwig <hch at lst.de>

Index: sheepdog/sheep/store.c
===================================================================
--- sheepdog.orig/sheep/store.c	2011-11-14 16:34:09.534609838 +0100
+++ sheepdog/sheep/store.c	2011-11-14 16:34:18.517943118 +0100
@@ -306,7 +306,7 @@ out:
 static int forward_write_obj_req(struct request *req, int idx)
 {
 	int i, n, nr, fd, ret;
-	unsigned wlen, rlen;
+	unsigned wlen;
 	char name[128];
 	struct sd_obj_req hdr = *(struct sd_obj_req *)&req->rq;
 	struct sd_obj_rsp *rsp = (struct sd_obj_rsp *)&req->rp;
@@ -336,7 +336,6 @@ static int forward_write_obj_req(struct
 	hdr.flags |= SD_FLAG_CMD_IO_LOCAL;
 
 	wlen = hdr.data_length;
-	rlen = 0;
 
 	for (i = 0; i < copies; i++) {
 		n = obj_to_sheep(e, nr, oid, i);



More information about the sheepdog mailing list