diff --git a/ext/agoo/domain.c b/ext/agoo/domain.c index cfc75e7..f4b7450 100644 --- a/ext/agoo/domain.c +++ b/ext/agoo/domain.c @@ -19,7 +19,7 @@ typedef struct _domain { static Domain domains = NULL; bool -agoo_domain_use() { +agoo_domain_use(void) { return NULL != domains; } @@ -128,7 +128,7 @@ agoo_domain_resolve(const char *host, char *buf, size_t blen) { } void -agoo_domain_cleanup() { +agoo_domain_cleanup(void) { Domain d; while (NULL != (d = domains)) { diff --git a/ext/agoo/dtime.c b/ext/agoo/dtime.c index 48d1c7e..6657bd9 100644 --- a/ext/agoo/dtime.c +++ b/ext/agoo/dtime.c @@ -12,7 +12,7 @@ #endif double -dtime() { +dtime(void) { struct timespec ts; clock_gettime(CLOCK_REALTIME_COURSE, &ts); diff --git a/ext/agoo/error_stream.c b/ext/agoo/error_stream.c index 0601c31..551ca73 100644 --- a/ext/agoo/error_stream.c +++ b/ext/agoo/error_stream.c @@ -23,7 +23,7 @@ es_free(void *ptr) { } VALUE -error_stream_new() { +error_stream_new(void) { ErrorStream es = (ErrorStream)AGOO_MALLOC(sizeof(struct _errorStream)); if (NULL == es) { diff --git a/ext/agoo/gqleval.c b/ext/agoo/gqleval.c index 225bc61..12dbf59 100644 --- a/ext/agoo/gqleval.c +++ b/ext/agoo/gqleval.c @@ -317,7 +317,7 @@ gql_eval_sels(agooErr err, gqlDoc doc, gqlRef ref, gqlField field, gqlSel sels, } gqlType -gql_root_type() { +gql_root_type(void) { if (NULL == _gql_root_type && NULL != gql_type_func) { _gql_root_type = gql_type_func(gql_root); } diff --git a/ext/agoo/graphql.c b/ext/agoo/graphql.c index 79ccdcb..f6f975c 100644 --- a/ext/agoo/graphql.c +++ b/ext/agoo/graphql.c @@ -429,7 +429,7 @@ gql_init(agooErr err) { extern gqlType _gql_root_type; void -gql_destroy() { +gql_destroy(void) { Slot *sp = buckets; Slot s; Slot n; diff --git a/ext/agoo/http.c b/ext/agoo/http.c index a551740..2973a2f 100644 --- a/ext/agoo/http.c +++ b/ext/agoo/http.c @@ -465,7 +465,7 @@ key_set(const char *key) { } void -agoo_http_init() { +agoo_http_init(void) { const char **kp = header_keys; memset(&key_cache, 0, sizeof(struct _cache)); @@ -475,7 +475,7 @@ agoo_http_init() { } void -agoo_http_cleanup() { +agoo_http_cleanup(void) { Slot *sp = key_cache.buckets; Slot s; Slot n; diff --git a/ext/agoo/log.c b/ext/agoo/log.c index f6c466f..10301c0 100644 --- a/ext/agoo/log.c +++ b/ext/agoo/log.c @@ -74,7 +74,7 @@ find_color(const char *name) { } static bool -agoo_log_queue_empty() { +agoo_log_queue_empty(void) { agooLogEntry head = atomic_load(&agoo_log.head); agooLogEntry next = head + 1; @@ -88,7 +88,7 @@ agoo_log_queue_empty() { } static int -agoo_log_listen() { +agoo_log_listen(void) { if (0 == agoo_log.rsock) { int fd[2]; @@ -105,7 +105,7 @@ agoo_log_listen() { } static void -agoo_log_release() { +agoo_log_release(void) { char buf[8]; // clear pipe @@ -233,7 +233,7 @@ classic_write(agooLogEntry e, FILE *file) { // Remove all file with sequence numbers higher than max_files. max_files is // max number of archived version. It does not include the primary. static void -remove_old_logs() { +remove_old_logs(void) { struct dirent *de; long seq; char *end; @@ -271,7 +271,7 @@ remove_old_logs() { } void -agoo_log_rotate() { +agoo_log_rotate(void) { char from[1060]; char to[1060]; int seq; @@ -356,7 +356,7 @@ agoo_log_flush(double timeout) { } void -agoo_log_open_file() { +agoo_log_open_file(void) { char path[1500]; if (agoo_log.with_pid) { @@ -379,7 +379,7 @@ agoo_log_open_file() { } void -agoo_log_close() { +agoo_log_close(void) { agoo_log.done = true; // TBD wake up loop like push does agoo_log_cat_on(NULL, false); @@ -450,7 +450,7 @@ agoo_log_cat_find(const char *label) { #ifdef CLOCK_REALTIME int64_t -agoo_now_nano() { +agoo_now_nano(void) { struct timespec ts; clock_gettime(CLOCK_REALTIME, &ts); @@ -459,7 +459,7 @@ agoo_now_nano() { } #else int64_t -agoo_now_nano() { +agoo_now_nano(void) { struct timeval tv; struct timezone tz; diff --git a/ext/agoo/page.c b/ext/agoo/page.c index 61db2da..c9d32b8 100644 --- a/ext/agoo/page.c +++ b/ext/agoo/page.c @@ -368,7 +368,7 @@ agoo_page_destroy(agooPage p) { } void -agoo_pages_cleanup() { +agoo_pages_cleanup(void) { Slot *sp = cache.buckets; Slot s; Slot n; diff --git a/ext/agoo/rack_logger.c b/ext/agoo/rack_logger.c index eb14ed3..770d1cc 100644 --- a/ext/agoo/rack_logger.c +++ b/ext/agoo/rack_logger.c @@ -10,7 +10,7 @@ static VALUE rl_class = Qundef; VALUE -rack_logger_new() { +rack_logger_new(void) { return rb_class_new_instance(0, NULL, rl_class); } diff --git a/ext/agoo/rresponse.c b/ext/agoo/rresponse.c index 01722b7..bb305bc 100644 --- a/ext/agoo/rresponse.c +++ b/ext/agoo/rresponse.c @@ -25,7 +25,7 @@ response_free(void *ptr) { } VALUE -response_new() { +response_new(void) { agooResponse res = (agooResponse)AGOO_MALLOC(sizeof(struct _agooResponse)); if (NULL == res) { diff --git a/ext/agoo/rserver.c b/ext/agoo/rserver.c index 396969c..cac3372 100644 --- a/ext/agoo/rserver.c +++ b/ext/agoo/rserver.c @@ -918,7 +918,7 @@ rserver_start(VALUE self) { } static void -stop_runners() { +stop_runners(void) { // The preferred method of waiting for the ruby threads would be either a // join or even a kill but since we may not have the gvl here that would // cause a segfault. Instead we set a timeout and wait for the running