Commit 8fd74c0806511694db20f40b4ce6ed32c00212c9

Patrick Steinhardt 2016-02-09T12:18:28

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.

diff --git a/src/diff_driver.c b/src/diff_driver.c
index bc35189..2ead551 100644
--- a/src/diff_driver.c
+++ b/src/diff_driver.c
@@ -59,7 +59,7 @@ static git_diff_driver global_drivers[3] = {
 	{ 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__calloc(1, sizeof(git_diff_driver_registry));
diff --git a/src/settings.c b/src/settings.c
index 0da19ea..00a3ef0 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -23,7 +23,7 @@ void git_libgit2_version(int *major, int *minor, int *rev)
 	*rev = LIBGIT2_VER_REVISION;
 }
 
-int git_libgit2_features()
+int git_libgit2_features(void)
 {
 	return 0
 #ifdef GIT_THREADS
@@ -73,12 +73,12 @@ static int config_level_to_sysdir(int config_level)
 extern char *git__user_agent;
 extern char *git__ssl_ciphers;
 
-const char *git_libgit2__user_agent()
+const char *git_libgit2__user_agent(void)
 {
 	return git__user_agent;
 }
 
-const char *git_libgit2__ssl_ciphers()
+const char *git_libgit2__ssl_ciphers(void)
 {
 	return git__ssl_ciphers;
 }
diff --git a/tests/clar.c b/tests/clar.c
index 2caa871..4bee9f7 100644
--- a/tests/clar.c
+++ b/tests/clar.c
@@ -409,7 +409,7 @@ clar_test_init(int argc, char **argv)
 }
 
 int
-clar_test_run()
+clar_test_run(void)
 {
 	if (_clar.argc > 1)
 		clar_parse_args(_clar.argc, _clar.argv);
@@ -424,7 +424,7 @@ clar_test_run()
 }
 
 void
-clar_test_shutdown()
+clar_test_shutdown(void)
 {
 	clar_print_shutdown(
 		_clar.tests_ran,