mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
use explict casts to silence truncation warnings
This commit is contained in:
@@ -419,10 +419,11 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
|
|||||||
&target->zoneoptions,
|
&target->zoneoptions,
|
||||||
&nentry->opts);
|
&nentry->opts);
|
||||||
|
|
||||||
result = isc_ht_find(target->entries, key, keysize,
|
result = isc_ht_find(target->entries, key,
|
||||||
(void **) &oentry);
|
(isc_uint32_t)keysize, (void **) &oentry);
|
||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
result = isc_ht_add(toadd, key, keysize, nentry);
|
result = isc_ht_add(toadd, key, (isc_uint32_t)keysize,
|
||||||
|
nentry);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
||||||
DNS_LOGMODULE_MASTER,
|
DNS_LOGMODULE_MASTER,
|
||||||
@@ -435,7 +436,8 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dns_catz_entry_cmp(oentry, nentry) != ISC_TRUE) {
|
if (dns_catz_entry_cmp(oentry, nentry) != ISC_TRUE) {
|
||||||
result = isc_ht_add(tomod, key, keysize, nentry);
|
result = isc_ht_add(tomod, key, (isc_uint32_t)keysize,
|
||||||
|
nentry);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
isc_log_write(dns_lctx, DNS_LOGCATEGORY_GENERAL,
|
||||||
DNS_LOGMODULE_MASTER,
|
DNS_LOGMODULE_MASTER,
|
||||||
@@ -446,7 +448,8 @@ dns_catz_zones_merge(dns_catz_zone_t *target, dns_catz_zone_t *newzone) {
|
|||||||
isc_result_totext(result));
|
isc_result_totext(result));
|
||||||
}
|
}
|
||||||
dns_catz_entry_detach(target, &oentry);
|
dns_catz_entry_detach(target, &oentry);
|
||||||
result = isc_ht_delete(target->entries, key, keysize);
|
result = isc_ht_delete(target->entries, key,
|
||||||
|
(isc_uint32_t)keysize);
|
||||||
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
RUNTIME_CHECK(result == ISC_R_SUCCESS);
|
||||||
}
|
}
|
||||||
RUNTIME_CHECK(result == ISC_R_NOMORE);
|
RUNTIME_CHECK(result == ISC_R_NOMORE);
|
||||||
@@ -1463,7 +1466,7 @@ dns_catz_generate_masterfilename(dns_catz_zone_t *zone, dns_catz_entry_t *entry,
|
|||||||
if (entry->opts.zonedir != NULL)
|
if (entry->opts.zonedir != NULL)
|
||||||
rlen += strlen(entry->opts.zonedir) + 1;
|
rlen += strlen(entry->opts.zonedir) + 1;
|
||||||
|
|
||||||
result = isc_buffer_reserve(buffer, rlen);
|
result = isc_buffer_reserve(buffer, (unsigned int)rlen);
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user