callback-job: Replace return_false() in constructors with dedicated function

Besides being clearer, this fixes issues with GCC 15.  The latter uses
C23 by default, which changes the meaning of function declarations
without parameters such as

	bool return false();

Instead of "this function takes an unknown number of arguments", this
now equals (void), that is, "this function takes no arguments".  So we
run into incompatible pointer type warnings all over when using such
functions.  They could be cast to (void*) but this seems the cleaner
solution for this use case.
This commit is contained in:
Tobias Brunner committed 2025-03-19 10:22:37 +01:00
1 parent 38d89f57f0
commit d5d2568ff0
25 files changed
+51 -33

No files matched your search

+1 -1
View File
@@ -230,7 +230,7 @@ ipsec_event_relay_t *ipsec_event_relay_create()
lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create((callback_job_cb_t)handle_events, this,
NULL, (callback_job_cancel_t)return_false));
NULL, callback_job_cancel_thread));
return &this->public;
}
+2 -2
View File
@@ -336,9 +336,9 @@ ipsec_processor_t *ipsec_processor_create()
lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create((callback_job_cb_t)process_inbound, this,
NULL, (callback_job_cancel_t)return_false));
NULL, callback_job_cancel_thread));
lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create((callback_job_cb_t)process_outbound, this,
NULL, (callback_job_cancel_t)return_false));
NULL, callback_job_cancel_thread));
return &this->public;
}