Commit f120e92b232c237bf44b30e5732679180fa12e28

nulltoken 2011-06-07T08:41:33

Fix compilation warnings in MSVC

diff --git a/src/refs.c b/src/refs.c
index 1c2d1a8..20f9e0d 100644
--- a/src/refs.c
+++ b/src/refs.c
@@ -1051,12 +1051,15 @@ cleanup:
 
 static int _reference_available_cb(const char *ref, void *data)
 {
+	const char *new, *old;
+	git_vector *refs;
+
 	assert(ref && data);
 
-	git_vector *refs = (git_vector *)data;
+	refs = (git_vector *)data;
 
-	const char *new = (const char *)git_vector_get(refs, 0);
-	const char *old = (const char *)git_vector_get(refs, 1);
+	new = (const char *)git_vector_get(refs, 0);
+	old = (const char *)git_vector_get(refs, 1);
 
 	if (!old || strcmp(old, ref)) {
 		int reflen = strlen(ref);