Commit 9152417290e7e375552638c2b340e9163c80dd8d

Russell Belfer 2014-01-02T14:30:24

Fix warnings with submodule changes

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;