From 19f329d2f4ddc355ff699c856fec8081d7aac4a3 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 25 Jan 2023 03:51:38 +0000 Subject: [PATCH] openrc, openrc-run: Fix -Wstrict-prototypes These become fine with C23 because () starts to mean (void) then, but for previous language versions, it's deprecated, and it causes an annoying warning when building with Clang by default. Plus, GCC lacks specific flags to trigger what C23 *does* ban, so a lot of people are going around building with -Wstrict-prototypes, so let's just fix this to be consistent with the rest of the codebase anyway to fend off false positive reports. --- src/openrc-run/openrc-run.c | 4 ++-- src/openrc/rc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openrc-run/openrc-run.c b/src/openrc-run/openrc-run.c index c7749f32..f2bf76b9 100644 --- a/src/openrc-run/openrc-run.c +++ b/src/openrc-run/openrc-run.c @@ -161,7 +161,7 @@ handle_signal(int sig) } static void -unhotplug() +unhotplug(void) { char *file = NULL; @@ -788,7 +788,7 @@ svc_start_deps(void) services = NULL; } -static void svc_start_real() +static void svc_start_real(void) { bool started; RC_STRING *svc, *svc2; diff --git a/src/openrc/rc.c b/src/openrc/rc.c index c853c829..3f023492 100644 --- a/src/openrc/rc.c +++ b/src/openrc/rc.c @@ -452,7 +452,7 @@ handle_signal(int sig) } static void -do_sysinit() +do_sysinit(void) { struct utsname uts; const char *sys;