mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-05 17:12:51 +00:00
Fix -Wuninitialized warning
This commit is contained in:
parent
21d847d38f
commit
13faa77c57
@ -68,7 +68,7 @@ static int write_file_stream(
|
|||||||
int fd, error;
|
int fd, error;
|
||||||
char buffer[4096];
|
char buffer[4096];
|
||||||
git_odb_stream *stream = NULL;
|
git_odb_stream *stream = NULL;
|
||||||
ssize_t read_len, written = 0;
|
ssize_t read_len = -1, written = 0;
|
||||||
|
|
||||||
if ((error = git_odb_open_wstream(
|
if ((error = git_odb_open_wstream(
|
||||||
&stream, odb, (size_t)file_size, GIT_OBJ_BLOB)) < 0)
|
&stream, odb, (size_t)file_size, GIT_OBJ_BLOB)) < 0)
|
||||||
|
@ -115,7 +115,7 @@ int git_odb__hashfd(git_oid *out, git_file fd, size_t size, git_otype type)
|
|||||||
int hdr_len;
|
int hdr_len;
|
||||||
char hdr[64], buffer[2048];
|
char hdr[64], buffer[2048];
|
||||||
git_hash_ctx *ctx;
|
git_hash_ctx *ctx;
|
||||||
ssize_t read_len;
|
ssize_t read_len = -1;
|
||||||
|
|
||||||
hdr_len = format_object_header(hdr, sizeof(hdr), size, type);
|
hdr_len = format_object_header(hdr, sizeof(hdr), size, type);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user