Commit 3556a82a2ab3280ef6282de5d7f97248929a517f

Leo Yang 2015-02-09T17:35:25

Fix build warning on Android Always do a time_t cast on st_mtime. st_mtime on Android is not the type of time_t but has the same meaning which is the number of seconds past epoch.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/fileops.c b/src/fileops.c
index bd9d27c..68c2e89 100644
--- a/src/fileops.c
+++ b/src/fileops.c
@@ -174,7 +174,7 @@ int git_futils_readbuffer_updated(
 	 */
 	if (size && *size != (size_t)st.st_size)
 		changed = true;
-	if (mtime && *mtime != st.st_mtime)
+	if (mtime && *mtime != (time_t)st.st_mtime)
 		changed = true;
 	if (!size && !mtime)
 		changed = true;