Commit 71379313 by Russell Belfer

Fix warnings on Windows 64-bit build

parent 1ca3e49f
......@@ -657,9 +657,17 @@ int git_filter_list_apply_to_blob(
git_filter_list *filters,
git_blob *blob)
{
git_buf in = {
(char *)git_blob_rawcontent(blob), 0, git_blob_rawsize(blob)
};
git_buf in = GIT_BUF_INIT;
git_off_t rawsize = git_blob_rawsize(blob);
if (!git__is_sizet(rawsize)) {
giterr_set(GITERR_OS, "Blob is too large to filter");
return -1;
}
in.ptr = (char *)git_blob_rawcontent(blob);
in.asize = 0;
in.size = (size_t)rawsize;
if (filters)
git_oid_cpy(&filters->source.oid, git_blob_id(blob));
......
......@@ -382,7 +382,7 @@ static void assert_hooks_match(
cl_git_pass(git_buf_joinpath(&actual, repo_dir, hook_path));
cl_git_pass(git_path_lstat(actual.ptr, &st));
cl_assert_equal_sz(expected_st.st_size, st.st_size);
cl_assert(expected_st.st_size == st.st_size);
if (GIT_MODE_TYPE(expected_st.st_mode) != GIT_FILEMODE_LINK) {
mode_t expected_mode =
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment