Commit b97c169ec0e6f6297dd00cae425f91e8baeb0f58

nulltoken 2012-09-04T10:01:18

Fix MSVC compilation warnings

diff --git a/src/diff_output.c b/src/diff_output.c
index 2bf939f..1f2c723 100644
--- a/src/diff_output.c
+++ b/src/diff_output.c
@@ -727,7 +727,7 @@ int git_diff_entrycount(git_diff_list *diff, int delta_t)
 	assert(diff);
 
 	if (delta_t < 0)
-		return diff->deltas.length;
+		return (int)diff->deltas.length;
 
 	git_vector_foreach(&diff->deltas, i, delta) {
 		if (delta->status == (git_delta_t)delta_t)
diff --git a/src/signature.c b/src/signature.c
index 84c3f49..0159488 100644
--- a/src/signature.c
+++ b/src/signature.c
@@ -142,7 +142,7 @@ int git_signature_now(git_signature **sig_out, const char *name, const char *ema
 	time(&now);
 	utc_tm = p_gmtime_r(&now, &_utc);
 	utc_tm->tm_isdst = -1;
-	offset = difftime(now, mktime(utc_tm));
+	offset = (time_t)difftime(now, mktime(utc_tm));
 	offset /= 60;
 
 	if (git_signature_new(&sig, name, email, now, (int)offset) < 0)