mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 17:05:49 +00:00
Fix warnings on Windows 64-bit build
This commit is contained in:
parent
1ca3e49f88
commit
713793133f
14
src/filter.c
14
src/filter.c
@ -657,9 +657,17 @@ int git_filter_list_apply_to_blob(
|
|||||||
git_filter_list *filters,
|
git_filter_list *filters,
|
||||||
git_blob *blob)
|
git_blob *blob)
|
||||||
{
|
{
|
||||||
git_buf in = {
|
git_buf in = GIT_BUF_INIT;
|
||||||
(char *)git_blob_rawcontent(blob), 0, git_blob_rawsize(blob)
|
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)
|
if (filters)
|
||||||
git_oid_cpy(&filters->source.oid, git_blob_id(blob));
|
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_buf_joinpath(&actual, repo_dir, hook_path));
|
||||||
cl_git_pass(git_path_lstat(actual.ptr, &st));
|
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) {
|
if (GIT_MODE_TYPE(expected_st.st_mode) != GIT_FILEMODE_LINK) {
|
||||||
mode_t expected_mode =
|
mode_t expected_mode =
|
||||||
|
Loading…
Reference in New Issue
Block a user