Merge pull request #2805 from ethomson/msvc submodule: declare vars at top of func block
diff --git a/src/submodule.c b/src/submodule.c
index d89dd04..a7bdebe 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -889,8 +889,11 @@ static int git_submodule_update_repo_init_cb(
int bare,
void *payload)
{
+ git_submodule *sm;
+
GIT_UNUSED(bare);
- git_submodule *sm = payload;
+
+ sm = payload;
return submodule_repo_create(out, sm->repo, path);
}