added UNUSED() macros to suppress compiler warnings when

compiling with assertion checking turned off
This commit is contained in:
Andreas Gustafsson
2000-08-08 23:40:46 +00:00
parent 20df5357b1
commit efadda9a7b
+17 -13
View File
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: a_1.c,v 1.37 2000/08/01 01:26:18 tale Exp $ */
/* $Id: a_1.c,v 1.38 2000/08/08 23:40:46 gson Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
@@ -34,12 +34,13 @@ fromtext_in_a(ARGS_FROMTEXT) {
struct in_addr addr;
isc_region_t region;
UNUSED(origin);
UNUSED(downcase);
REQUIRE(type == 1);
REQUIRE(rdclass == 1);
UNUSED(origin);
UNUSED(downcase);
UNUSED(rdclass);
RETERR(gettoken(lexer, &token, isc_tokentype_string, ISC_FALSE));
if (inet_aton(token.value.as_pointer, &addr) != 1)
@@ -56,12 +57,12 @@ static inline isc_result_t
totext_in_a(ARGS_TOTEXT) {
isc_region_t region;
UNUSED(tctx);
REQUIRE(rdata->type == 1);
REQUIRE(rdata->rdclass == 1);
REQUIRE(rdata->length == 4);
UNUSED(tctx);
isc_buffer_availableregion(target, &region);
if (inet_ntop(AF_INET, rdata->data,
(char *)region.base, region.length) == NULL)
@@ -76,12 +77,13 @@ fromwire_in_a(ARGS_FROMWIRE) {
isc_region_t sregion;
isc_region_t tregion;
UNUSED(dctx);
UNUSED(downcase);
REQUIRE(type == 1);
REQUIRE(rdclass == 1);
UNUSED(dctx);
UNUSED(downcase);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sregion);
isc_buffer_availableregion(target, &tregion);
if (sregion.length < 4)
@@ -99,11 +101,11 @@ static inline isc_result_t
towire_in_a(ARGS_TOWIRE) {
isc_region_t region;
UNUSED(cctx);
REQUIRE(rdata->type == 1);
REQUIRE(rdata->rdclass == 1);
UNUSED(cctx);
isc_buffer_availableregion(target, &region);
if (region.length < rdata->length)
return (ISC_R_NOSPACE);
@@ -138,6 +140,8 @@ fromstruct_in_a(ARGS_FROMSTRUCT) {
REQUIRE(a->common.rdtype == type);
REQUIRE(a->common.rdclass == rdclass);
UNUSED(rdclass);
n = ntohl(a->in_addr.s_addr);
return (uint32_tobuffer(n, target));
@@ -150,11 +154,11 @@ tostruct_in_a(ARGS_TOSTRUCT) {
isc_uint32_t n;
isc_region_t region;
UNUSED(mctx);
REQUIRE(rdata->type == 1);
REQUIRE(rdata->rdclass == 1);
UNUSED(mctx);
a->common.rdclass = rdata->rdclass;
a->common.rdtype = rdata->type;
ISC_LINK_INIT(&a->common, link);