diff options
-rw-r--r-- | submodule.h | 2 | ||||
-rw-r--r-- | test-subprocess.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/submodule.h b/submodule.h index 80e04f3c8c..9c5e5c0c30 100644 --- a/submodule.h +++ b/submodule.h @@ -13,7 +13,7 @@ enum { void set_diffopt_flags_from_submodule_config(struct diff_options *diffopt, const char *path); int submodule_config(const char *var, const char *value, void *cb); -void gitmodules_config(); +void gitmodules_config(void); int parse_submodule_config_option(const char *var, const char *value); void handle_ignore_submodules_arg(struct diff_options *diffopt, const char *); int parse_fetch_recurse_submodules_arg(const char *opt, const char *arg); diff --git a/test-subprocess.c b/test-subprocess.c index 8926bc52a9..f2d4c0d22b 100644 --- a/test-subprocess.c +++ b/test-subprocess.c @@ -1,7 +1,7 @@ #include "cache.h" #include "run-command.h" -int main(int argc, char **argv) +int main(int argc, const char **argv) { struct child_process cp; int nogit = 0; @@ -9,12 +9,12 @@ int main(int argc, char **argv) setup_git_directory_gently(&nogit); if (nogit) die("No git repo found"); - if (!strcmp(argv[1], "--setup-work-tree")) { + if (argc > 1 && !strcmp(argv[1], "--setup-work-tree")) { setup_work_tree(); argv++; } memset(&cp, 0, sizeof(cp)); cp.git_cmd = 1; - cp.argv = (const char **)argv+1; + cp.argv = argv + 1; return run_command(&cp); } |