silence %lu vs size_t warning by casting to (unsigned long)

(cherry picked from commit 1dc8208a89)
This commit is contained in:
Mark Andrews 2017-11-24 10:25:37 +11:00
parent 889cc681eb
commit c4f2e47fea
2 changed files with 5 additions and 5 deletions

View file

@ -112,19 +112,19 @@ nsec3param_salttotext_test(const nsec3param_salttotext_test_params_t *params) {
ATF_CHECK_EQ_MSG(result, ISC_R_NOSPACE,
"\"%s\": expected a %lu-byte target buffer to be "
"rejected, got %s\n",
params->nsec3param_text, length - 1,
params->nsec3param_text, (unsigned long)(length - 1),
isc_result_totext(result));
result = dns_nsec3param_salttotext(&nsec3param, salt, length);
ATF_CHECK_EQ_MSG(result, ISC_R_NOSPACE,
"\"%s\": expected a %lu-byte target buffer to be "
"rejected, got %s\n",
params->nsec3param_text, length,
params->nsec3param_text, (unsigned long)length,
isc_result_totext(result));
result = dns_nsec3param_salttotext(&nsec3param, salt, length + 1);
ATF_CHECK_EQ_MSG(result, ISC_R_SUCCESS,
"\"%s\": expected a %lu-byte target buffer to be "
"accepted, got %s\n",
params->nsec3param_text, length + 1,
params->nsec3param_text, (unsigned long)(length + 1),
isc_result_totext(result));
}

View file

@ -247,7 +247,7 @@ check_wire_ok_single(const wire_ok_t *wire_ok, dns_rdataclass_t rdclass,
wire_ok->lineno,
dns_test_tohex(wire_ok->data, wire_ok->len,
hex, sizeof(hex)),
wire_ok->len);
(unsigned long)wire_ok->len);
} else {
ATF_REQUIRE_MSG(result != ISC_R_SUCCESS,
"line %d: %s (%lu): "
@ -255,7 +255,7 @@ check_wire_ok_single(const wire_ok_t *wire_ok, dns_rdataclass_t rdclass,
wire_ok->lineno,
dns_test_tohex(wire_ok->data, wire_ok->len,
hex, sizeof(hex)),
wire_ok->len);
(unsigned long)wire_ok->len);
}
/*
* If data was parsed correctly, perform two-way conversion checks