Commit 8fd74c08 by Patrick Steinhardt

Avoid old-style function definitions

Avoid declaring old-style functions without any parameters.
Functions not accepting any parameters should be declared with
`void fn(void)`. See ISO C89 $3.5.4.3.
parent bb0edf87
...@@ -59,7 +59,7 @@ static git_diff_driver global_drivers[3] = { ...@@ -59,7 +59,7 @@ static git_diff_driver global_drivers[3] = {
{ DIFF_DRIVER_TEXT, GIT_DIFF_FORCE_TEXT, 0 }, { DIFF_DRIVER_TEXT, GIT_DIFF_FORCE_TEXT, 0 },
}; };
git_diff_driver_registry *git_diff_driver_registry_new() git_diff_driver_registry *git_diff_driver_registry_new(void)
{ {
git_diff_driver_registry *reg = git_diff_driver_registry *reg =
git__calloc(1, sizeof(git_diff_driver_registry)); git__calloc(1, sizeof(git_diff_driver_registry));
......
...@@ -23,7 +23,7 @@ void git_libgit2_version(int *major, int *minor, int *rev) ...@@ -23,7 +23,7 @@ void git_libgit2_version(int *major, int *minor, int *rev)
*rev = LIBGIT2_VER_REVISION; *rev = LIBGIT2_VER_REVISION;
} }
int git_libgit2_features() int git_libgit2_features(void)
{ {
return 0 return 0
#ifdef GIT_THREADS #ifdef GIT_THREADS
...@@ -73,12 +73,12 @@ static int config_level_to_sysdir(int config_level) ...@@ -73,12 +73,12 @@ static int config_level_to_sysdir(int config_level)
extern char *git__user_agent; extern char *git__user_agent;
extern char *git__ssl_ciphers; extern char *git__ssl_ciphers;
const char *git_libgit2__user_agent() const char *git_libgit2__user_agent(void)
{ {
return git__user_agent; return git__user_agent;
} }
const char *git_libgit2__ssl_ciphers() const char *git_libgit2__ssl_ciphers(void)
{ {
return git__ssl_ciphers; return git__ssl_ciphers;
} }
......
...@@ -409,7 +409,7 @@ clar_test_init(int argc, char **argv) ...@@ -409,7 +409,7 @@ clar_test_init(int argc, char **argv)
} }
int int
clar_test_run() clar_test_run(void)
{ {
if (_clar.argc > 1) if (_clar.argc > 1)
clar_parse_args(_clar.argc, _clar.argv); clar_parse_args(_clar.argc, _clar.argv);
...@@ -424,7 +424,7 @@ clar_test_run() ...@@ -424,7 +424,7 @@ clar_test_run()
} }
void void
clar_test_shutdown() clar_test_shutdown(void)
{ {
clar_print_shutdown( clar_print_shutdown(
_clar.tests_ran, _clar.tests_ran,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment