Fix warnings with submodule changes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/include/git2/submodule.h b/include/git2/submodule.h
index a150759..4b4ba6e 100644
--- a/include/git2/submodule.h
+++ b/include/git2/submodule.h
@@ -437,7 +437,7 @@ GIT_EXTERN(git_submodule_recurse_t) git_submodule_fetch_recurse_submodules(
* @param fetch_recurse_submodules Boolean value
* @return old value for fetchRecurseSubmodules
*/
-GIT_EXTERN(int) git_submodule_set_fetch_recurse_submodules(
+GIT_EXTERN(git_submodule_recurse_t) git_submodule_set_fetch_recurse_submodules(
git_submodule *submodule,
git_submodule_recurse_t fetch_recurse_submodules);
diff --git a/src/submodule.c b/src/submodule.c
index 5548e45..26dfe2c 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -632,11 +632,11 @@ git_submodule_recurse_t git_submodule_fetch_recurse_submodules(
return submodule->fetch_recurse;
}
-int git_submodule_set_fetch_recurse_submodules(
+git_submodule_recurse_t git_submodule_set_fetch_recurse_submodules(
git_submodule *submodule,
git_submodule_recurse_t fetch_recurse_submodules)
{
- int old;
+ git_submodule_recurse_t old;
assert(submodule);
@@ -990,7 +990,7 @@ static git_submodule *submodule_alloc(git_repository *repo, const char *name)
GIT_REFCOUNT_INC(sm);
sm->ignore = sm->ignore_default = GIT_SUBMODULE_IGNORE_NONE;
sm->update = sm->update_default = GIT_SUBMODULE_UPDATE_CHECKOUT;
- sm->fetch_recurse = sm->update_default = GIT_SUBMODULE_RECURSE_YES;
+ sm->fetch_recurse = GIT_SUBMODULE_RECURSE_YES;
sm->repo = repo;
return sm;