summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-02-12 10:22:54 -0800
committerEdward Thomson <ethomson@github.com>2016-02-16 11:50:47 +0000
commitb2ca8d9c29fb6e2a6b8ce695f2943a94be6ef7a4 (patch)
tree566b97e26fe90c4c9408fa51e5a0fe98726069d0
parent997e0301541e5f3babdd18105f4155d6108d1490 (diff)
downloadlibgit2-b2ca8d9c29fb6e2a6b8ce695f2943a94be6ef7a4.tar.gz
index: explicitly cast the teeny index entry members
-rw-r--r--src/index.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/index.c b/src/index.c
index 98e20e054..bfa9fc849 100644
--- a/src/index.c
+++ b/src/index.c
@@ -826,8 +826,8 @@ const git_index_entry *git_index_get_bypath(
void git_index_entry__init_from_stat(
git_index_entry *entry, struct stat *st, bool trust_mode)
{
- entry->ctime.seconds = (git_time_t)st->st_ctime;
- entry->mtime.seconds = (git_time_t)st->st_mtime;
+ entry->ctime.seconds = (int32_t)st->st_ctime;
+ entry->mtime.seconds = (int32_t)st->st_mtime;
#if defined(GIT_USE_NSEC)
entry->mtime.nanoseconds = st->st_mtim.tv_nsec;
entry->ctime.nanoseconds = st->st_ctim.tv_nsec;
@@ -838,7 +838,7 @@ void git_index_entry__init_from_stat(
git_index__create_mode(0666) : git_index__create_mode(st->st_mode);
entry->uid = st->st_uid;
entry->gid = st->st_gid;
- entry->file_size = st->st_size;
+ entry->file_size = (uint32_t)st->st_size;
}
static void index_entry_adjust_namemask(