Commit d37ba6720de36b5121f4e978f65ab5703d12523f

Vicent Martí 2011-07-09T06:45:30

Merge pull request #312 from nulltoken/patch-2 Fix MSVC compilation warning

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/odb.c b/src/odb.c
index 52546e7..a3045f7 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -149,7 +149,7 @@ int git_odb_hashfile(git_oid *out, const char *path, git_otype type)
 		return git__throw(GIT_EOSERR, "'%s' appears to be corrupted", path);
 	}
 
-	hdr_len = format_object_header(hdr, sizeof(hdr), size, type);
+	hdr_len = format_object_header(hdr, sizeof(hdr), (size_t)size, type);
 	if (hdr_len < 0)
 		return git__throw(GIT_ERROR, "Failed to format blob header. Length is out of bounds");