diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-21 10:16:05 -0500 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2022-02-22 22:07:44 -0500 |
| commit | c716b9f295c0a46073f134a23735dd7b811745fe (patch) | |
| tree | 092c3ba6c12955407e4ba27646c0a5cab80a1058 /src/odb.c | |
| parent | eca9e1cfec2be5a55401290de9eb944bcb54c867 (diff) | |
| download | libgit2-c716b9f295c0a46073f134a23735dd7b811745fe.tar.gz | |
odb: initialize `object` before use
Newer gcc is complaining about `object` being potentially not
initialized; initialize it.
Diffstat (limited to 'src/odb.c')
| -rw-r--r-- | src/odb.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1067,7 +1067,7 @@ int git_odb_expand_ids( int git_odb_read_header(size_t *len_p, git_object_t *type_p, git_odb *db, const git_oid *id) { int error; - git_odb_object *object; + git_odb_object *object = NULL; error = git_odb__read_header_or_object(&object, len_p, type_p, db, id); |
