summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-04-13 17:35:29 +0200
committerDirk Engling <erdgeist@erdgeist.org>2026-04-13 17:35:29 +0200
commitb0a0432e8d26414d77cfeb81ab2e6c10896c6883 (patch)
tree0adec918eedb6712c82eb62ac9239519eeab941a
parent5d2033ac8932d223a00d7d6e29cedd9b2e23bc7f (diff)
Silence warnings about function declaration without a prototype for functions taking void
-rw-r--r--ot_accesslist.c4
-rw-r--r--ot_accesslist.h2
-rw-r--r--ot_fullscrape.c4
-rw-r--r--ot_fullscrape.h4
-rw-r--r--ot_mutex.c6
-rw-r--r--ot_stats.c6
-rw-r--r--ot_udp.c2
-rw-r--r--trackerlogic.c2
8 files changed, 15 insertions, 15 deletions
diff --git a/ot_accesslist.c b/ot_accesslist.c
index 253fe95..f1bb885 100644
--- a/ot_accesslist.c
+++ b/ot_accesslist.c
@@ -342,7 +342,7 @@ static void *accesslist_deleter_worker(void *args) {
342#endif 342#endif
343 343
344static pthread_t thread_id; 344static pthread_t thread_id;
345void accesslist_init() { 345void accesslist_init(void) {
346 pthread_mutex_init(&g_accesslist_mutex, NULL); 346 pthread_mutex_init(&g_accesslist_mutex, NULL);
347 pthread_create(&thread_id, NULL, accesslist_worker, NULL); 347 pthread_create(&thread_id, NULL, accesslist_worker, NULL);
348#ifdef WANT_DYNAMIC_ACCESSLIST 348#ifdef WANT_DYNAMIC_ACCESSLIST
@@ -444,7 +444,7 @@ void loglist_add_network(const ot_net *net) {
444 pthread_mutex_unlock(&g_lognets_list_mutex); 444 pthread_mutex_unlock(&g_lognets_list_mutex);
445} 445}
446 446
447void loglist_reset() { 447void loglist_reset(void) {
448 pthread_mutex_lock(&g_lognets_list_mutex); 448 pthread_mutex_lock(&g_lognets_list_mutex);
449 free(g_lognets_list.data); 449 free(g_lognets_list.data);
450 g_lognets_list.data = 0; 450 g_lognets_list.data = 0;
diff --git a/ot_accesslist.h b/ot_accesslist.h
index 0a7488e..d05e1f7 100644
--- a/ot_accesslist.h
+++ b/ot_accesslist.h
@@ -72,7 +72,7 @@ struct ot_log {
72extern ot_log *g_logchain_first, *g_logchain_last; 72extern ot_log *g_logchain_first, *g_logchain_last;
73 73
74void loglist_add_network(const ot_net *net); 74void loglist_add_network(const ot_net *net);
75void loglist_reset(); 75void loglist_reset(void);
76int loglist_check_address(const ot_ip6 address); 76int loglist_check_address(const ot_ip6 address);
77#endif 77#endif
78 78
diff --git a/ot_fullscrape.c b/ot_fullscrape.c
index 7a8cca6..b800431 100644
--- a/ot_fullscrape.c
+++ b/ot_fullscrape.c
@@ -88,11 +88,11 @@ static void *fullscrape_worker(void *args) {
88} 88}
89 89
90static pthread_t thread_id; 90static pthread_t thread_id;
91void fullscrape_init( ) { 91void fullscrape_init(void) {
92 pthread_create( &thread_id, NULL, fullscrape_worker, NULL ); 92 pthread_create( &thread_id, NULL, fullscrape_worker, NULL );
93} 93}
94 94
95void fullscrape_deinit( ) { 95void fullscrape_deinit(void) {
96 pthread_cancel( thread_id ); 96 pthread_cancel( thread_id );
97} 97}
98 98
diff --git a/ot_fullscrape.h b/ot_fullscrape.h
index bbb2a3f..843e039 100644
--- a/ot_fullscrape.h
+++ b/ot_fullscrape.h
@@ -10,8 +10,8 @@
10 10
11#include "ot_mutex.h" 11#include "ot_mutex.h"
12 12
13void fullscrape_init(); 13void fullscrape_init(void);
14void fullscrape_deinit(); 14void fullscrape_deinit(void);
15void fullscrape_deliver(int64 sock, ot_tasktype tasktype); 15void fullscrape_deliver(int64 sock, ot_tasktype tasktype);
16 16
17#else 17#else
diff --git a/ot_mutex.c b/ot_mutex.c
index a1dba1f..be3ddf9 100644
--- a/ot_mutex.c
+++ b/ot_mutex.c
@@ -48,7 +48,7 @@ void mutex_bucket_unlock_by_hash(ot_hash const hash, int delta_torrentcount) {
48 mutex_bucket_unlock(uint32_read_big((char *)hash) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount); 48 mutex_bucket_unlock(uint32_read_big((char *)hash) >> OT_BUCKET_COUNT_SHIFT, delta_torrentcount);
49} 49}
50 50
51size_t mutex_get_torrent_count() { return g_torrent_count; } 51size_t mutex_get_torrent_count(void) { return g_torrent_count; }
52 52
53/* TaskQueue Magic */ 53/* TaskQueue Magic */
54 54
@@ -253,7 +253,7 @@ int64 mutex_workqueue_popresult(size_t *iovec_entries, struct iovec **iovec, int
253 return sock; 253 return sock;
254} 254}
255 255
256void mutex_init() { 256void mutex_init(void) {
257 size_t i; 257 size_t i;
258 pthread_mutex_init(&tasklist_mutex, NULL); 258 pthread_mutex_init(&tasklist_mutex, NULL);
259 pthread_cond_init(&tasklist_being_filled, NULL); 259 pthread_cond_init(&tasklist_being_filled, NULL);
@@ -262,7 +262,7 @@ void mutex_init() {
262 byte_zero(all_torrents, sizeof(all_torrents)); 262 byte_zero(all_torrents, sizeof(all_torrents));
263} 263}
264 264
265void mutex_deinit() { 265void mutex_deinit(void) {
266 size_t i; 266 size_t i;
267 for (i = 0; i < OT_BUCKET_COUNT; ++i) 267 for (i = 0; i < OT_BUCKET_COUNT; ++i)
268 pthread_mutex_destroy(bucket_mutex + i); 268 pthread_mutex_destroy(bucket_mutex + i);
diff --git a/ot_stats.c b/ot_stats.c
index a9e745c..58ac4b8 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -741,7 +741,7 @@ void stats_issue_event(ot_status_event event, PROTO_FLAG proto, uintptr_t event_
741 } 741 }
742} 742}
743 743
744void stats_cleanup() { 744void stats_cleanup(void) {
745#ifdef WANT_SPOT_WOODPECKER 745#ifdef WANT_SPOT_WOODPECKER
746 pthread_mutex_lock(&g_woodpeckers_mutex); 746 pthread_mutex_lock(&g_woodpeckers_mutex);
747 stats_shift_down_network_count(&stats_woodpeckers_tree, 0, 1); 747 stats_shift_down_network_count(&stats_woodpeckers_tree, 0, 1);
@@ -768,11 +768,11 @@ static void *stats_worker(void *args) {
768void stats_deliver(int64 sock, int tasktype) { mutex_workqueue_pushtask(sock, tasktype); } 768void stats_deliver(int64 sock, int tasktype) { mutex_workqueue_pushtask(sock, tasktype); }
769 769
770static pthread_t thread_id; 770static pthread_t thread_id;
771void stats_init() { 771void stats_init(void) {
772 ot_start_time = g_now_seconds; 772 ot_start_time = g_now_seconds;
773 pthread_create(&thread_id, NULL, stats_worker, NULL); 773 pthread_create(&thread_id, NULL, stats_worker, NULL);
774} 774}
775 775
776void stats_deinit() { 776void stats_deinit(void) {
777 pthread_cancel(thread_id); 777 pthread_cancel(thread_id);
778} 778}
diff --git a/ot_udp.c b/ot_udp.c
index 97ccd38..990868c 100644
--- a/ot_udp.c
+++ b/ot_udp.c
@@ -28,7 +28,7 @@ static uint32_t g_rijndael_round_key[44] = {0};
28static uint32_t g_key_of_the_hour[2] = {0}; 28static uint32_t g_key_of_the_hour[2] = {0};
29static ot_time g_hour_of_the_key; 29static ot_time g_hour_of_the_key;
30 30
31static void udp_generate_rijndael_round_key() { 31static void udp_generate_rijndael_round_key(void) {
32 uint32_t key[16]; 32 uint32_t key[16];
33#ifdef WANT_ARC4RANDOM 33#ifdef WANT_ARC4RANDOM
34 arc4random_buf(&key[0], sizeof(key)); 34 arc4random_buf(&key[0], sizeof(key));
diff --git a/trackerlogic.c b/trackerlogic.c
index 1e25ec8..7f9c893 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -552,7 +552,7 @@ void exerr(char *message) {
552 exit(111); 552 exit(111);
553} 553}
554 554
555void trackerlogic_init() { 555void trackerlogic_init(void) {
556 g_tracker_id = random(); 556 g_tracker_id = random();
557 557
558 if (!g_stats_path) 558 if (!g_stats_path)