kernel: fix -Wstrict-prototypes warnings/errors

* On newer kernel for some reason -Wno-strict-prototypes still does not fix the errors or warnings.
* To fix it, we just need to add void type.

Signed-off-by: rsuntk <rsuntk@yukiprjkt.my.id>
This commit is contained in:
rsuntk
2025-08-28 15:46:22 +07:00
committed by ShirkNeko
parent 6e5226efbb
commit 22eb11c391
13 changed files with 44 additions and 41 deletions

View File

@@ -45,9 +45,9 @@ static const char KERNEL_SU_RC[] =
" exec u:r:su:s0 root -- " KSUD_PATH " boot-completed\n"
"\n";
static void stop_vfs_read_hook();
static void stop_execve_hook();
static void stop_input_hook();
static void stop_vfs_read_hook(void);
static void stop_execve_hook(void);
static void stop_input_hook(void);
#ifdef CONFIG_KSU_KPROBES_HOOK
static struct work_struct stop_vfs_read_work;
@@ -627,7 +627,7 @@ int __maybe_unused ksu_handle_compat_execve_ksud(const char __user *filename_use
#endif
static void stop_vfs_read_hook()
static void stop_vfs_read_hook(void)
{
#ifdef CONFIG_KSU_KPROBES_HOOK
bool ret = schedule_work(&stop_vfs_read_work);
@@ -638,7 +638,7 @@ static void stop_vfs_read_hook()
#endif
}
static void stop_execve_hook()
static void stop_execve_hook(void)
{
#ifdef CONFIG_KSU_KPROBES_HOOK
bool ret = schedule_work(&stop_execve_hook_work);
@@ -653,7 +653,7 @@ static void stop_execve_hook()
#endif
}
static void stop_input_hook()
static void stop_input_hook(void)
{
#ifdef CONFIG_KSU_KPROBES_HOOK
static bool input_hook_stopped = false;
@@ -672,7 +672,7 @@ static void stop_input_hook()
}
// ksud: module support
void ksu_ksud_init()
void ksu_ksud_init(void)
{
#ifdef CONFIG_KSU_KPROBES_HOOK
int ret;
@@ -692,7 +692,7 @@ void ksu_ksud_init()
#endif
}
void ksu_ksud_exit()
void ksu_ksud_exit(void)
{
#ifdef CONFIG_KSU_KPROBES_HOOK
unregister_kprobe(&execve_kp);