Skip to content

Commit f25bb50

Browse files
committed
index test: cast times explicitly
Cast actual filesystem data to the int32_t that index entries store.
1 parent 1d4ddb8 commit f25bb50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/index/racy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,8 @@ static void setup_race(void)
126126
cl_assert(entry = (git_index_entry *)git_index_get_bypath(index, "A", 0));
127127

128128
/* force a race */
129-
entry->mtime.seconds = st.st_mtime;
130-
entry->mtime.nanoseconds = st.st_mtime_nsec;
129+
entry->mtime.seconds = (int32_t)st.st_mtime;
130+
entry->mtime.nanoseconds = (int32_t)st.st_mtime_nsec;
131131

132132
git_buf_dispose(&path);
133133
}

0 commit comments

Comments
 (0)