mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Fix undefined behaviour occurrences
The undefined behaviour was detected by LLVM 17. Fix the affected functions definitions to match the expected function type.
This commit is contained in:
@@ -579,7 +579,9 @@ dns_ntatable_save(dns_ntatable_t *ntatable, FILE *fp) {
|
||||
}
|
||||
|
||||
static void
|
||||
dns__nta_shutdown_cb(dns__nta_t *nta) {
|
||||
dns__nta_shutdown_cb(void *arg) {
|
||||
dns__nta_t *nta = arg;
|
||||
|
||||
REQUIRE(VALID_NTA(nta));
|
||||
|
||||
if (isc_log_wouldlog(dns_lctx, ISC_LOG_DEBUG(3))) {
|
||||
@@ -602,7 +604,7 @@ dns__nta_shutdown(dns__nta_t *nta) {
|
||||
REQUIRE(VALID_NTA(nta));
|
||||
|
||||
dns__nta_ref(nta);
|
||||
isc_async_run(nta->loop, (isc_job_cb)dns__nta_shutdown_cb, nta);
|
||||
isc_async_run(nta->loop, dns__nta_shutdown_cb, nta);
|
||||
nta->shuttingdown = true;
|
||||
}
|
||||
|
||||
|
@@ -634,7 +634,7 @@ resquery_connected(isc_result_t eresult, isc_region_t *region, void *arg);
|
||||
static void
|
||||
fctx_try(fetchctx_t *fctx, bool retrying, bool badcache);
|
||||
static void
|
||||
fctx_shutdown(fetchctx_t *fctx);
|
||||
fctx_shutdown(void *arg);
|
||||
static void
|
||||
fctx_minimize_qname(fetchctx_t *fctx);
|
||||
static void
|
||||
@@ -4369,7 +4369,9 @@ fctx_expired(void *arg) {
|
||||
}
|
||||
|
||||
static void
|
||||
fctx_shutdown(fetchctx_t *fctx) {
|
||||
fctx_shutdown(void *arg) {
|
||||
fetchctx_t *fctx = arg;
|
||||
|
||||
REQUIRE(VALID_FCTX(fctx));
|
||||
|
||||
fctx_done_unref(fctx, ISC_R_SHUTTINGDOWN);
|
||||
@@ -10151,8 +10153,7 @@ dns_resolver_shutdown(dns_resolver_t *res) {
|
||||
INSIST(fctx != NULL);
|
||||
|
||||
fetchctx_ref(fctx);
|
||||
isc_async_run(fctx->loop, (isc_job_cb)fctx_shutdown,
|
||||
fctx);
|
||||
isc_async_run(fctx->loop, fctx_shutdown, fctx);
|
||||
}
|
||||
isc_hashmap_iter_destroy(&it);
|
||||
RWUNLOCK(&res->fctxs_lock, isc_rwlocktype_write);
|
||||
@@ -10495,7 +10496,7 @@ dns_resolver_createfetch(dns_resolver_t *res, const dns_name_t *name,
|
||||
|
||||
if (new_fctx) {
|
||||
fetchctx_ref(fctx);
|
||||
isc_async_run(fctx->loop, (isc_job_cb)fctx_start, fctx);
|
||||
isc_async_run(fctx->loop, fctx_start, fctx);
|
||||
}
|
||||
|
||||
unlock:
|
||||
|
@@ -235,7 +235,7 @@ noop_recv_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED,
|
||||
}
|
||||
|
||||
isc_result_t
|
||||
noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, unsigned int eresult,
|
||||
noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t eresult,
|
||||
void *cbarg ISC_ATTR_UNUSED) {
|
||||
F();
|
||||
|
||||
|
@@ -235,7 +235,7 @@ noop_recv_cb(isc_nmhandle_t *handle, isc_result_t eresult, isc_region_t *region,
|
||||
void *cbarg);
|
||||
|
||||
isc_result_t
|
||||
noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, unsigned int result,
|
||||
noop_accept_cb(isc_nmhandle_t *handle ISC_ATTR_UNUSED, isc_result_t result,
|
||||
void *cbarg ISC_ATTR_UNUSED);
|
||||
|
||||
void
|
||||
|
Reference in New Issue
Block a user