Skip to content

Commit

Permalink
fixup more voids
Browse files Browse the repository at this point in the history
  • Loading branch information
jiridanek committed Oct 22, 2022
1 parent f961b15 commit 4337714
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 32 deletions.
2 changes: 1 addition & 1 deletion include/qpid/dispatch/internal/symbolization.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef struct qd_backtrace_fileline {

/// Call qd_symbolize_finalize when you are done, to free global state.
/// This also invalidates all const char pointers previously returned.
void qd_symbolize_finalize();
void qd_symbolize_finalize(void);

void qd_print_symbolized_backtrace_line(FILE *dump_file, const char *fallback_symbolization, int i, void *pc);
qd_backtrace_fileline_t qd_symbolize_backtrace_line(void *target_address);
Expand Down
4 changes: 2 additions & 2 deletions src/posix/symbolization.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static struct {
Dwfl_Callbacks dwfl_callbacks; ///< struct holding libdfl callbacks
} state = {0};

bool ensure_libdwfl_intialized()
bool ensure_libdwfl_intialized(void)
{
if (!state.libdwlf_inited) {
state.dwfl_callbacks.find_elf = &dwfl_linux_proc_find_elf;
Expand Down Expand Up @@ -127,7 +127,7 @@ void qd_print_symbolized_backtrace_line(FILE *dump_file, const char *fallback_sy
fprintf(dump_file, " %s\n", fallback_symbolization);
}

void qd_symbolize_finalize()
void qd_symbolize_finalize(void)
{
if (state.libdwlf_inited) {
dwfl_end(state.dwfl);
Expand Down
9 changes: 6 additions & 3 deletions src/router_core/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ typedef void (*qdrc_module_final_t) (void *module_context);
* @param on_init Pointer to a function for module initialization, called at core thread startup
* @param on_final Pointer to a function for module finalization, called at core thread shutdown
*/
#define QDR_CORE_MODULE_DECLARE(name,enable,on_init,on_final) \
static void modstart() __attribute__((constructor)); \
void modstart() { qdr_register_core_module(name, enable, on_init, on_final); }
#define QDR_CORE_MODULE_DECLARE(name, enable, on_init, on_final) \
static void modstart(void) __attribute__((constructor)); \
void modstart(void) \
{ \
qdr_register_core_module(name, enable, on_init, on_final); \
}
void qdr_register_core_module(const char *name,
qdrc_module_enable_t enable,
qdrc_module_init_t on_init,
Expand Down
5 changes: 2 additions & 3 deletions src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ static bool timer_cancel_LH(qd_timer_t *timer)


/* Adjust timer's time_base and delays for the current time. */
static void timer_adjust_now_LH()
static void timer_adjust_now_LH(void)
{
qd_timestamp_t now = qd_timer_now();
if (time_base != 0 && now > time_base) {
Expand Down Expand Up @@ -282,8 +282,7 @@ void qd_timer_cancel(qd_timer_t *timer)
// Private Functions from timer_private.h
//=========================================================================


void qd_timer_initialize()
void qd_timer_initialize(void)
{
sys_mutex_init(&lock);
DEQ_INIT(scheduled_timers);
Expand Down
3 changes: 1 addition & 2 deletions tests/buffer_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ static char *test_buffer_field_iterator(void *context)
return result;
}


int buffer_tests()
int buffer_tests(void)
{
int result = 0;
char *test_group = "buffer_tests";
Expand Down
2 changes: 1 addition & 1 deletion tests/clogger.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void start_message(void)


/* return true when message transmit is complete */
bool send_message_data()
bool send_message_data(void)
{
static const char zero_block[DEFAULT_MAX_FRAME] = {0};

Expand Down
3 changes: 1 addition & 2 deletions tests/compose_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,7 @@ static char *test_compose_buffer_field(void *context)
return error;
}


int compose_tests()
int compose_tests(void)
{
int result = 0;
char *test_group = "compose_tests";
Expand Down
3 changes: 1 addition & 2 deletions tests/failoverlist_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ static char *test_failover_list_multiple(void *unused)
return fail;
}


int failoverlist_tests()
int failoverlist_tests(void)
{
int result = 0;
char *test_group = "failover_tests";
Expand Down
3 changes: 1 addition & 2 deletions tests/parse_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -717,8 +717,7 @@ static char *test_field_api(void *context)
return result;
}


int parse_tests()
int parse_tests(void)
{
int result = 0;
char *test_group = "parse_tests";
Expand Down
12 changes: 5 additions & 7 deletions tests/run_unit_tests_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@ extern void qd_buffer_set_size_test_only(size_t size);

void qd_log_initialize(void);
void qd_log_finalize(void);
void qd_error_initialize();
void qd_error_initialize(void);
void qd_router_id_initialize(const char *, const char *);
void qd_router_id_finalize(void);


int message_tests();
int field_tests();
int parse_tests();
int buffer_tests();

int message_tests(void);
int field_tests(void);
int parse_tests(void);
int buffer_tests(void);

// validate router id constructor
//
Expand Down
3 changes: 1 addition & 2 deletions tests/thread_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ static char *test_condition(void *context)
return result;
}


int thread_tests()
int thread_tests(void)
{
int result = 0;
char *test_group = "thread_tests";
Expand Down
4 changes: 2 additions & 2 deletions tests/threaded_timer_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ static struct event_t {
sys_cond_t c;
} event;

static void test_setup()
static void test_setup(void)
{
sys_mutex_init(&event.m);
sys_cond_init(&event.c);
}

static void test_cleanup()
static void test_cleanup(void)
{
sys_mutex_free(&event.m);
sys_cond_free(&event.c);
Expand Down
6 changes: 3 additions & 3 deletions tests/timer_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ static qd_timer_t *timers[16];


/* Dummy out the now and timeout functions */
qd_timestamp_t qd_timer_now() {
qd_timestamp_t qd_timer_now(void)
{
return time_value;
}

Expand Down Expand Up @@ -282,8 +283,7 @@ static char* test_big(void *context)
return 0;
}


int timer_tests()
int timer_tests(void)
{
char *test_group = "timer_tests";
int result = 0;
Expand Down

0 comments on commit 4337714

Please sign in to comment.