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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user