Skip to content

Commit

Permalink
[tidy] Add void parameter lists to some function declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
thoni56 committed Aug 2, 2023
1 parent 2c6c0ec commit 8ed1154
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/posix_cgreen_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#endif

#if defined(HAVE_GETTIMEOFDAY)
uint32_t cgreen_time_get_current_milliseconds() {
uint32_t cgreen_time_get_current_milliseconds(void) {
#ifdef __CYGWIN__
/* TODO: This is actually the POSIX recommended way to do this */
struct timespec ts;
Expand All @@ -37,5 +37,4 @@ uint32_t cgreen_time_get_current_milliseconds() {
}
#endif


/* vim: set ts=4 sw=4 et cindent: */
4 changes: 2 additions & 2 deletions src/reporter.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static void assert_true(TestReporter *reporter, const char *file, int line,
int result, const char *message, ...);
static int read_reporter_results(TestReporter *reporter);

TestReporter *get_test_reporter() {
TestReporter *get_test_reporter(void) {
return context.reporter;
}

Expand All @@ -44,7 +44,7 @@ void set_reporter_options(TestReporter *reporter, void *options) {
reporter->options = options;
}

TestReporter *create_reporter() {
TestReporter *create_reporter(void) {
CgreenBreadcrumb *breadcrumb;
TestReporter *reporter = (TestReporter *) malloc(sizeof(TestReporter));
if (reporter == NULL) {
Expand Down
6 changes: 3 additions & 3 deletions src/runner.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ static void run_test_in_the_current_process(TestSuite *suite, CgreenTest *test,
(*reporter->finish_test)(reporter, test->filename, test->line, NULL);
}

static int per_test_timeout_defined() {
static int per_test_timeout_defined(void) {
return getenv(CGREEN_PER_TEST_TIMEOUT_ENVIRONMENT_VARIABLE) != NULL;
}

static int per_test_timeout_value() {
static int per_test_timeout_value(void) {
char* timeout_string;
int timeout_value;

Expand All @@ -171,7 +171,7 @@ static int per_test_timeout_value() {
return timeout_value;
}

static void validate_per_test_timeout_value() {
static void validate_per_test_timeout_value(void) {
int timeout = per_test_timeout_value();

if (timeout <= 0) {
Expand Down

0 comments on commit 8ed1154

Please sign in to comment.