From 7414acf5f97c0be1fec0504a61624be3eb814f2f Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Mon, 23 Jan 2017 12:28:02 +0000 Subject: [PATCH 1/2] parameter 'id' not found in the function declaration --- include/git2/tree.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/git2/tree.h b/include/git2/tree.h index a38215f9f..4740b1ffa 100644 --- a/include/git2/tree.h +++ b/include/git2/tree.h @@ -381,7 +381,7 @@ GIT_EXTERN(int) git_treebuilder_write( * * @see git_treebuilder_write * - * @param id Pointer to store the OID of the newly written tree + * @param oid Pointer to store the OID of the newly written tree * @param bld Tree builder to write * @param tree Shared buffer for writing the tree. Will be grown as necessary. * @return 0 or an error code From e2b3dc16b904b4989e076ec263da429724e7294b Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Mon, 23 Jan 2017 13:29:47 +0100 Subject: [PATCH 2/2] variable 'i' is used uninitialized whenever 'if' condition is true --- src/submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/submodule.c b/src/submodule.c index 21e3d45e4..e1f59b88e 100644 --- a/src/submodule.c +++ b/src/submodule.c @@ -349,9 +349,10 @@ done: static int submodules_from_index(git_strmap *map, git_index *idx, git_config *cfg) { int error; - git_iterator *i; + git_iterator *i = NULL; const git_index_entry *entry; git_strmap *names = 0; + git_strmap_alloc(&names); if ((error = load_submodule_names(names, cfg))) goto done;