[sheepdog] [PATCH] lib/shared: fix warning in alloc_request()

Yu Yang yuyanggg at gmail.com
Sat Apr 18 10:09:00 CEST 2015


From: Yu Yang <yuyang at cmss.chinamobile.com>

There is a warning in vdi.c:
shared/vdi.c:120:39: warning: declaration of 'write' shadows a global declaration [-Wshadow]
Change write to iswrite.

Signed-off-by: Yu Yang <yuyang at cmss.chinamobile.com>
---
 lib/shared/vdi.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/shared/vdi.c b/lib/shared/vdi.c
index d40bd4b..39b8acb 100644
--- a/lib/shared/vdi.c
+++ b/lib/shared/vdi.c
@@ -117,7 +117,7 @@ static void free_request(struct sd_request *req)
 }
 
 static struct sd_request *alloc_request(struct sd_vdi *vdi, void *buf,
-					size_t count, off_t offset, bool write)
+			size_t count, off_t offset, bool iswrite)
 {
 	struct sd_request *req;
 	int fd;
@@ -130,7 +130,7 @@ static struct sd_request *alloc_request(struct sd_vdi *vdi, void *buf,
 	req->data = buf;
 	req->length = count;
 	req->offset = offset;
-	req->write = write;
+	req->write = iswrite;
 	INIT_LIST_NODE(&req->list);
 	req->vdi = vdi;
 
-- 
1.7.9.5




More information about the sheepdog mailing list