Enabled -Wstrict-prototypes and fixed warnings.
This commit is contained in:
@@ -16,13 +16,13 @@ test_double_free_pre(void) {
|
||||
}
|
||||
|
||||
static void
|
||||
test_double_free_post() {
|
||||
test_double_free_post(void) {
|
||||
expect_b_eq(fake_abort_called, true, "Double-free check didn't fire.");
|
||||
safety_check_set_abort(NULL);
|
||||
}
|
||||
|
||||
static bool
|
||||
tcache_enabled() {
|
||||
tcache_enabled(void) {
|
||||
bool enabled;
|
||||
size_t sz = sizeof(enabled);
|
||||
assert_d_eq(
|
||||
|
@@ -95,7 +95,7 @@ do_fork_thd(void *arg) {
|
||||
|
||||
#ifndef _WIN32
|
||||
static void
|
||||
do_test_fork_multithreaded() {
|
||||
do_test_fork_multithreaded(void) {
|
||||
thd_t child;
|
||||
thd_create(&child, do_fork_thd, NULL);
|
||||
do_fork_thd(NULL);
|
||||
|
@@ -14,7 +14,7 @@ static uintptr_t arg_args_raw[4];
|
||||
static int call_count = 0;
|
||||
|
||||
static void
|
||||
reset_args() {
|
||||
reset_args(void) {
|
||||
arg_extra = NULL;
|
||||
arg_type = 12345;
|
||||
arg_result = NULL;
|
||||
@@ -40,7 +40,7 @@ alloc_free_size(size_t sz) {
|
||||
* allocation scenarios.
|
||||
*/
|
||||
static void
|
||||
be_reentrant() {
|
||||
be_reentrant(void) {
|
||||
/* Let's make sure the tcache is non-empty if enabled. */
|
||||
alloc_free_size(1);
|
||||
alloc_free_size(1024);
|
||||
@@ -77,7 +77,7 @@ expect_args_raw(uintptr_t *args_raw_expected, int nargs) {
|
||||
}
|
||||
|
||||
static void
|
||||
reset() {
|
||||
reset(void) {
|
||||
call_count = 0;
|
||||
reset_args();
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "test/sleep.h"
|
||||
|
||||
static void
|
||||
sleep_for_background_thread_interval() {
|
||||
sleep_for_background_thread_interval(void) {
|
||||
/*
|
||||
* The sleep interval set in our .sh file is 50ms. So it likely will
|
||||
* run if we sleep for four times that.
|
||||
@@ -11,7 +11,7 @@ sleep_for_background_thread_interval() {
|
||||
}
|
||||
|
||||
static unsigned
|
||||
create_arena() {
|
||||
create_arena(void) {
|
||||
unsigned arena_ind;
|
||||
size_t sz;
|
||||
|
||||
|
@@ -7,7 +7,7 @@ static void *last_junked_ptr;
|
||||
static size_t last_junked_usize;
|
||||
|
||||
static void
|
||||
reset() {
|
||||
reset(void) {
|
||||
ptr_ind = 0;
|
||||
last_junked_ptr = NULL;
|
||||
last_junked_usize = 0;
|
||||
|
@@ -4,11 +4,11 @@
|
||||
#define N_PARAM 100
|
||||
#define N_THREADS 10
|
||||
|
||||
static void expect_rep() {
|
||||
static void expect_rep(void) {
|
||||
expect_b_eq(prof_log_rep_check(), false, "Rep check failed");
|
||||
}
|
||||
|
||||
static void expect_log_empty() {
|
||||
static void expect_log_empty(void) {
|
||||
expect_zu_eq(prof_log_bt_count(), 0,
|
||||
"The log has backtraces; it isn't empty");
|
||||
expect_zu_eq(prof_log_thr_count(), 0,
|
||||
@@ -19,7 +19,7 @@ static void expect_log_empty() {
|
||||
|
||||
void *buf[N_PARAM];
|
||||
|
||||
static void f() {
|
||||
static void f(void) {
|
||||
int i;
|
||||
for (i = 0; i < N_PARAM; i++) {
|
||||
buf[i] = malloc(100);
|
||||
@@ -91,18 +91,18 @@ TEST_BEGIN(test_prof_log_many_threads) {
|
||||
}
|
||||
TEST_END
|
||||
|
||||
static void f3() {
|
||||
static void f3(void) {
|
||||
void *p = malloc(100);
|
||||
free(p);
|
||||
}
|
||||
|
||||
static void f1() {
|
||||
static void f1(void) {
|
||||
void *p = malloc(100);
|
||||
f3();
|
||||
free(p);
|
||||
}
|
||||
|
||||
static void f2() {
|
||||
static void f2(void) {
|
||||
void *p = malloc(100);
|
||||
free(p);
|
||||
}
|
||||
|
@@ -129,7 +129,7 @@ TEST_BEGIN(test_mdump_output_error) {
|
||||
TEST_END
|
||||
|
||||
static int
|
||||
prof_dump_open_maps_error() {
|
||||
prof_dump_open_maps_error(void) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@ const char *test_thread_name = "test_thread";
|
||||
|
||||
/* Invariant before and after every test (when config_prof is on) */
|
||||
static void
|
||||
confirm_prof_setup() {
|
||||
confirm_prof_setup(void) {
|
||||
/* Options */
|
||||
assert_true(opt_prof, "opt_prof not on");
|
||||
assert_true(opt_prof_active, "opt_prof_active not on");
|
||||
@@ -356,7 +356,7 @@ test_dump_write_cb(void *not_used, const char *str) {
|
||||
}
|
||||
|
||||
static void
|
||||
call_dump() {
|
||||
call_dump(void) {
|
||||
static void *in[2] = {test_dump_write_cb, NULL};
|
||||
dump_out_len = 0;
|
||||
assert_d_eq(mallctl("experimental.prof_recent.alloc_dump",
|
||||
|
@@ -3,7 +3,7 @@
|
||||
static bool hook_called = false;
|
||||
|
||||
static void
|
||||
hook() {
|
||||
hook(void) {
|
||||
hook_called = true;
|
||||
}
|
||||
|
||||
|
@@ -4,7 +4,8 @@
|
||||
|
||||
static bool abort_called = false;
|
||||
|
||||
void set_abort_called() {
|
||||
void set_abort_called(const char *message) {
|
||||
(void)message;
|
||||
abort_called = true;
|
||||
};
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
static uint64_t
|
||||
allocated() {
|
||||
allocated(void) {
|
||||
if (!config_stats) {
|
||||
return 0;
|
||||
}
|
||||
@@ -13,7 +13,7 @@ allocated() {
|
||||
}
|
||||
|
||||
static uint64_t
|
||||
deallocated() {
|
||||
deallocated(void) {
|
||||
if (!config_stats) {
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
static uint64_t
|
||||
deallocated() {
|
||||
deallocated(void) {
|
||||
if (!config_stats) {
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#include "test/jemalloc_test.h"
|
||||
|
||||
static size_t
|
||||
zero_reallocs() {
|
||||
zero_reallocs(void) {
|
||||
if (!config_stats) {
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user