summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorMichael Schubert <schu@schu.io>2012-09-13 17:57:45 +0200
committerMichael Schubert <schu@schu.io>2012-09-13 17:57:45 +0200
commit13faa77c57d3fe9ddcfbfdf35c0cdd631521a280 (patch)
treec2d549fb1edadd1d9dae92c144276a36b4d9068d /src/odb.c
parent21d847d38ffd5055ffbcaabebf115edbee8e8b94 (diff)
downloadlibgit2-13faa77c57d3fe9ddcfbfdf35c0cdd631521a280.tar.gz
Fix -Wuninitialized warning
Diffstat (limited to 'src/odb.c')
-rw-r--r--src/odb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb.c b/src/odb.c
index 0d3d809f7..c027c12c3 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -115,7 +115,7 @@ int git_odb__hashfd(git_oid *out, git_file fd, size_t size, git_otype type)
int hdr_len;
char hdr[64], buffer[2048];
git_hash_ctx *ctx;
- ssize_t read_len;
+ ssize_t read_len = -1;
hdr_len = format_object_header(hdr, sizeof(hdr), size, type);