@@ -169,21 +169,21 @@ static void kill_and_wait(int pid, int* status)
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
#define SYZ_HAVE_SETUP_TEST 1
-static void setup_test()
+static void setup_test(void)
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
write_file("/proc/self/oom_score_adj", "1000");
}
struct thread_t {
int created, call;
event_t ready, done;
};
@@ -88,21 +88,21 @@ static void kill_and_wait(int pid, int* status)
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
-static void setup_test()
+static void setup_test(void)
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
write_file("/proc/self/oom_score_adj", "1000");
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
@@ -604,21 +604,21 @@ static int test_multishot_accept(int count, bool before, bool overflow)
if (no_accept_multi)
return T_EXIT_SKIP;
ret = io_uring_queue_init(MAX_FDS + 10, &m_io_uring, 0);
assert(ret >= 0);
ret = test(&m_io_uring, args);
io_uring_queue_exit(&m_io_uring);
return ret;
}
-static int test_accept_multishot_wrong_arg()
+static int test_accept_multishot_wrong_arg(void)
{
struct io_uring m_io_uring;
struct io_uring_cqe *cqe;
struct io_uring_sqe *sqe;
int fd, ret;
ret = io_uring_queue_init(4, &m_io_uring, 0);
assert(ret >= 0);
fd = start_accept_listen(NULL, 0, 0);
@@ -47,21 +47,21 @@ static int inject_fault(int nth)
fd = open("/proc/thread-self/fail-nth", O_RDWR);
if (fd == -1)
exit(1);
char buf[16];
sprintf(buf, "%d", nth + 1);
if (write(fd, buf, strlen(buf)) != (ssize_t)strlen(buf))
exit(1);
return fd;
}
-static int setup_fault()
+static int setup_fault(void)
{
static struct {
const char* file;
const char* val;
bool fatal;
} files[] = {
{"/sys/kernel/debug/failslab/ignore-gfp-wait", "N", true},
{"/sys/kernel/debug/failslab/verbose", "0", false},
{"/sys/kernel/debug/fail_futex/ignore-private", "N", false},
{"/sys/kernel/debug/fail_page_alloc/verbose", "0", false},
@@ -245,21 +245,21 @@ static void kill_and_wait(int pid, int* status)
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
-static void setup_test()
+static void setup_test(void)
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
}
struct thread_t {
int created, call;
event_t ready, done;
};
@@ -129,21 +129,21 @@ static void kill_and_wait(int pid, int* status)
}
close(fd);
}
closedir(dir);
} else {
}
while (waitpid(-1, status, __WALL) != pid) {
}
}
-static void setup_test()
+static void setup_test(void)
{
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
setpgrp();
write_file("/proc/self/oom_score_adj", "1000");
}
static void execute_one(void);
#define WAIT_FLAGS __WALL
This is a preparation patch to integrate -Wstrict-prototypes flag to the GitHub CI robot. Clang says: warning: a function declaration without a prototype is \ deprecated in all versions of C [-Wstrict-prototypes] Make sure we put "void" in the argument list of the function declaration if the function doesn't accept any argument. Reproducer (with clang-16): ./configure --cc=clang --cxx=clang++; CFLAGS="-Wall -Wextra -Wstrict-prototypes" make -j8; Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org> --- test/35fa71a030ca.c | 2 +- test/a4c0b3decb33.c | 2 +- test/accept.c | 2 +- test/fc2a85cb02ef.c | 2 +- test/pollfree.c | 2 +- test/sqpoll-disable-exit.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)