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
2025-03-19 10:22:37 +01:00
parent 38d89f57f0
commit d5d2568ff0
25 changed files with 51 additions and 33 deletions
+1 -1
View File
@@ -585,7 +585,7 @@ cmd_connection_t *cmd_connection_create()
lib->processor->queue_job(lib->processor,
(job_t*)callback_job_create_with_prio(
(callback_job_cb_t)initiate, this, NULL,
(callback_job_cancel_t)return_false, JOB_PRIO_CRITICAL));
callback_job_cancel_thread, JOB_PRIO_CRITICAL));
return &this->public;
}