From 74c915dbe7401cc10c7f0a031ec0b37fa8648af4 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Wed, 31 Jan 2024 21:23:44 +0100 Subject: [PATCH] fix function declaration without a prototype Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- subprocess.c | 2 +- subprocess.h | 2 +- tempdir.c | 2 +- tempdir.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/subprocess.c b/subprocess.c index 8d292c0..9fbc36f 100644 --- a/subprocess.c +++ b/subprocess.c @@ -30,7 +30,7 @@ int childpid = -1; /* default to a bogus pid */ volatile sig_atomic_t killed_by_us = 0; volatile sig_atomic_t fatal_error_in_progress = 0; -void kill_process_group() { +void kill_process_group(void) { int pgid; killed_by_us = 1; diff --git a/subprocess.h b/subprocess.h index 94e2b1f..14e9aea 100644 --- a/subprocess.h +++ b/subprocess.h @@ -1,7 +1,7 @@ #ifndef __CRONUTILS_SUBPROCESS_H #define __CRONUTILS_SUBPROCESS_H -void kill_process_group(); +void kill_process_group(void); int run_subprocess(char* command, char** args, void (*pre_wait_function)(void)); #endif /* __CRONUTILS_SUBPROCESS_H */ diff --git a/tempdir.c b/tempdir.c index f445b2c..ed3a6dd 100644 --- a/tempdir.c +++ b/tempdir.c @@ -33,7 +33,7 @@ limitations under the License. const char* template = "/tmp/cronutils-"; char* dirname = NULL; -char* make_tempdir() { +char* make_tempdir(void) { uid_t uid; struct passwd* pw; struct stat st; diff --git a/tempdir.h b/tempdir.h index f2b22dd..3e12d1d 100644 --- a/tempdir.h +++ b/tempdir.h @@ -17,6 +17,6 @@ limitations under the License. #ifndef __CRONUTILS_TEMPDIR_H__ #define __CRONUTILS_TEMPDIR_H__ -char* make_tempdir(); +char* make_tempdir(void); #endif /* __CRONUTILS_TEMPDIR_H__ */