[sheepdog] [PATCH] Fix compile warning

Haomai Wang haomaiwang at gmail.com
Tue Jun 4 15:25:43 CEST 2013


From: Haomai Wang <haomaiwang at gmail>

fix complie warning below:
object_tree.c:112 warning: comparison of distinct pointer types lacks a cast

Signed-off-by: Haomai Wang <haomaiwang at gmail>
---
 collie/farm/object_tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/collie/farm/object_tree.c b/collie/farm/object_tree.c
index f719af6..e29583a 100644
--- a/collie/farm/object_tree.c
+++ b/collie/farm/object_tree.c
@@ -109,7 +109,7 @@ int for_each_object_in_tree(object_handler_func_t func, void *data)
 	struct object_tree_entry *entry;
 	uint64_t oid;
 	size_t size;
-	void *buf = xmalloc(max(SD_INODE_SIZE, SD_DATA_OBJ_SIZE));
+	void *buf = xmalloc(max(SD_INODE_SIZE, (size_t)SD_DATA_OBJ_SIZE));
 	int ret = -1;
 
 	while (p) {
-- 
1.7.12.4 (Apple Git-37)




More information about the sheepdog mailing list