diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2014-10-13 13:34:15 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@microsoft.com> | 2014-10-26 22:13:40 -0400 |
| commit | 369b0217330383925d8091ae01079789cde80598 (patch) | |
| tree | e3c14a87d6b43bf0a589ce8cd6dba09501040a7c /src/describe.c | |
| parent | 70f7e2c6e3fc908dd6a4e027dc43d5ce5be94d75 (diff) | |
| download | libgit2-369b0217330383925d8091ae01079789cde80598.tar.gz | |
Clean up various compiler warnings
Diffstat (limited to 'src/describe.c')
| -rw-r--r-- | src/describe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/describe.c b/src/describe.c index 9b41316fe..fb39c58fe 100644 --- a/src/describe.c +++ b/src/describe.c @@ -397,7 +397,7 @@ static int show_suffix( const git_oid* id, size_t abbrev_size) { - int error, size; + int error, size = 0; char hex_oid[GIT_OID_HEXSZ]; @@ -818,7 +818,8 @@ int git_describe_format(git_buf *out, const git_describe_result *result, const g /* If we didn't find *any* tags, we fall back to the commit's id */ if (result->fallback_to_id) { char hex_oid[GIT_OID_HEXSZ + 1] = {0}; - int size; + int size = 0; + if ((error = find_unique_abbrev_size( &size, repo, &result->commit_id, opts.abbreviated_size)) < 0) return -1; |
