Commit 63cef8bd authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

added UNUSED() macros for arguments that end up unused when assertion checking

is turned off
parent f8abaa0f
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: opt_41.c,v 1.18 2000/08/01 01:25:48 tale Exp $ */
/* $Id: opt_41.c,v 1.19 2000/12/01 01:40:36 gson Exp $ */
/* Reviewed: Thu Mar 16 14:06:44 PST 2000 by gson */
......@@ -167,6 +167,8 @@ fromstruct_opt(ARGS_FROMSTRUCT) {
REQUIRE((opt->options != NULL && opt->length != 0) ||
(opt->options == NULL && opt->length == 0));
UNUSED(rdclass);
region.base = opt->options;
region.length = opt->length;
while (region.length >= 4) {
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: ptr_12.c,v 1.33 2000/11/08 01:55:55 bwelling Exp $ */
/* $Id: ptr_12.c,v 1.34 2000/12/01 01:40:37 gson Exp $ */
/* Reviewed: Thu Mar 16 14:05:12 PST 2000 by explorer */
......@@ -130,6 +130,8 @@ fromstruct_ptr(ARGS_FROMSTRUCT) {
REQUIRE(ptr->common.rdtype == type);
REQUIRE(ptr->common.rdclass == rdclass);
UNUSED(rdclass);
dns_name_toregion(&ptr->ptr, &region);
return (isc_buffer_copyregion(target, &region));
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rp_17.c,v 1.29 2000/11/08 01:55:56 bwelling Exp $ */
/* $Id: rp_17.c,v 1.30 2000/12/01 01:40:39 gson Exp $ */
/* RFC 1183 */
......@@ -174,6 +174,8 @@ fromstruct_rp(ARGS_FROMSTRUCT) {
REQUIRE(rp->common.rdtype == type);
REQUIRE(rp->common.rdclass == rdclass);
UNUSED(rdclass);
dns_name_toregion(&rp->mail, &region);
RETERR(isc_buffer_copyregion(target, &region));
dns_name_toregion(&rp->text, &region);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: rt_21.c,v 1.31 2000/11/08 01:55:57 bwelling Exp $ */
/* $Id: rt_21.c,v 1.32 2000/12/01 01:40:40 gson Exp $ */
/* reviewed: Thu Mar 16 15:02:31 PST 2000 by brister */
......@@ -169,6 +169,8 @@ fromstruct_rt(ARGS_FROMSTRUCT) {
REQUIRE(rt->common.rdtype == type);
REQUIRE(rt->common.rdclass == rdclass);
UNUSED(rdclass);
RETERR(uint16_tobuffer(rt->preference, target));
dns_name_toregion(&rt->host, &region);
return (isc_buffer_copyregion(target, &region));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: sig_24.c,v 1.47 2000/11/08 01:55:58 bwelling Exp $ */
/* $Id: sig_24.c,v 1.48 2000/12/01 01:40:41 gson Exp $ */
/* Reviewed: Fri Mar 17 09:05:02 PST 2000 by gson */
......@@ -364,6 +364,8 @@ fromstruct_sig(ARGS_FROMSTRUCT) {
REQUIRE((sig->signature != NULL && sig->siglen != 0) ||
(sig->signature == NULL && sig->siglen == 0));
UNUSED(rdclass);
/*
* Type covered.
*/
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: soa_6.c,v 1.46 2000/11/08 01:55:59 bwelling Exp $ */
/* $Id: soa_6.c,v 1.47 2000/12/01 01:40:42 gson Exp $ */
/* Reviewed: Thu Mar 16 15:18:32 PST 2000 by explorer */
......@@ -263,6 +263,8 @@ fromstruct_soa(ARGS_FROMSTRUCT) {
REQUIRE(soa->common.rdtype == type);
REQUIRE(soa->common.rdclass == rdclass);
UNUSED(rdclass);
dns_name_toregion(&soa->origin, &region);
RETERR(isc_buffer_copyregion(target, &region));
dns_name_toregion(&soa->mname, &region);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: tkey_249.c,v 1.40 2000/11/08 01:56:01 bwelling Exp $ */
/* $Id: tkey_249.c,v 1.41 2000/12/01 01:40:43 gson Exp $ */
/*
* Reviewed: Thu Mar 16 17:35:30 PST 2000 by halley.
......@@ -352,6 +352,8 @@ fromstruct_tkey(ARGS_FROMSTRUCT) {
REQUIRE((tkey->other == NULL && tkey->otherlen == 0) ||
(tkey->other != NULL && tkey->otherlen != 0));
UNUSED(rdclass);
/*
* Algorithm Name.
*/
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: txt_16.c,v 1.31 2000/11/08 01:56:02 bwelling Exp $ */
/* $Id: txt_16.c,v 1.32 2000/12/01 01:40:44 gson Exp $ */
/* Reviewed: Thu Mar 16 15:40:00 PST 2000 by bwelling */
......@@ -129,6 +129,8 @@ fromstruct_txt(ARGS_FROMSTRUCT) {
REQUIRE((txt->txt == NULL && txt->txt_len == 0) ||
(txt->txt != NULL && txt->txt_len != 0));
UNUSED(rdclass);
region.base = txt->txt;
region.length = txt->txt_len;
while (region.length > 0) {
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: unspec_103.c,v 1.23 2000/08/01 01:26:09 tale Exp $ */
/* $Id: unspec_103.c,v 1.24 2000/12/01 01:40:45 gson Exp $ */
#ifndef RDATA_GENERIC_UNSPEC_103_C
#define RDATA_GENERIC_UNSPEC_103_C
......@@ -94,6 +94,8 @@ fromstruct_unspec(ARGS_FROMSTRUCT) {
REQUIRE((unspec->data != NULL && unspec->datalen != 0) ||
(unspec->data == NULL && unspec->datalen == 0));
UNUSED(rdclass);
return (mem_tobuffer(target, unspec->data, unspec->datalen));
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: x25_19.c,v 1.25 2000/11/08 01:56:03 bwelling Exp $ */
/* $Id: x25_19.c,v 1.26 2000/12/01 01:40:46 gson Exp $ */
/* Reviewed: Thu Mar 16 16:15:57 PST 2000 by bwelling */
......@@ -114,6 +114,8 @@ fromstruct_x25(ARGS_FROMSTRUCT) {
REQUIRE((x25->x25 == NULL && x25->x25_len == 0) ||
(x25->x25 != NULL && x25->x25_len != 0));
UNUSED(rdclass);
for (i = 0; i < x25->x25_len; i++)
if (!isdigit(x25->x25[i] & 0xff))
return (ISC_R_RANGE);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: a_1.c,v 1.19 2000/11/08 01:56:04 bwelling Exp $ */
/* $Id: a_1.c,v 1.20 2000/12/01 01:40:48 gson Exp $ */
/* reviewed: Thu Mar 16 15:58:36 PST 2000 by brister */
......@@ -37,6 +37,7 @@ fromtext_hs_a(ARGS_FROMTEXT) {
UNUSED(origin);
UNUSED(downcase);
UNUSED(rdclass);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
......@@ -80,7 +81,7 @@ fromwire_hs_a(ARGS_FROMWIRE) {
UNUSED(dctx);
UNUSED(downcase);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sregion);
isc_buffer_availableregion(target, &tregion);
......@@ -142,6 +143,8 @@ fromstruct_hs_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));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: a6_38.c,v 1.38 2000/11/08 01:56:05 bwelling Exp $ */
/* $Id: a6_38.c,v 1.39 2000/12/01 01:40:49 gson Exp $ */
/* draft-ietf-ipngwg-dns-lookups-03.txt */
......@@ -39,6 +39,8 @@ fromtext_in_a6(ARGS_FROMTEXT) {
REQUIRE(type == 38);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
/*
* Prefix length.
*/
......@@ -144,6 +146,8 @@ fromwire_in_a6(ARGS_FROMWIRE) {
REQUIRE(type == 38);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
isc_buffer_activeregion(source, &sr);
......@@ -276,6 +280,8 @@ fromstruct_in_a6(ARGS_FROMSTRUCT) {
REQUIRE(a6->common.rdtype == type);
REQUIRE(a6->common.rdclass == rdclass);
UNUSED(rdclass);
if (a6->prefixlen > 128)
return (ISC_R_RANGE);
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: a_1.c,v 1.40 2000/11/08 01:56:07 bwelling Exp $ */
/* $Id: a_1.c,v 1.41 2000/12/01 01:40:50 gson Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
......@@ -182,6 +182,8 @@ freestruct_in_a(ARGS_FREESTRUCT) {
REQUIRE(source != NULL);
REQUIRE(a->common.rdtype == 1);
REQUIRE(a->common.rdclass == 1);
UNUSED(a);
}
static inline isc_result_t
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: aaaa_28.c,v 1.30 2000/11/08 01:56:08 bwelling Exp $ */
/* $Id: aaaa_28.c,v 1.31 2000/12/01 01:40:51 gson Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
......@@ -34,12 +34,13 @@ fromtext_in_aaaa(ARGS_FROMTEXT) {
unsigned char addr[16];
isc_region_t region;
UNUSED(origin);
UNUSED(downcase);
REQUIRE(type == 28);
REQUIRE(rdclass == 1);
UNUSED(origin);
UNUSED(downcase);
UNUSED(rdclass);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
......@@ -77,12 +78,13 @@ fromwire_in_aaaa(ARGS_FROMWIRE) {
isc_region_t sregion;
isc_region_t tregion;
UNUSED(dctx);
UNUSED(downcase);
REQUIRE(type == 28);
REQUIRE(rdclass == 1);
UNUSED(dctx);
UNUSED(downcase);
UNUSED(rdclass);
isc_buffer_activeregion(source, &sregion);
isc_buffer_availableregion(target, &tregion);
if (sregion.length < 16)
......@@ -141,6 +143,8 @@ fromstruct_in_aaaa(ARGS_FROMSTRUCT) {
REQUIRE(aaaa->common.rdtype == type);
REQUIRE(aaaa->common.rdclass == rdclass);
UNUSED(rdclass);
return (mem_tobuffer(target, aaaa->in6_addr.s6_addr, 16));
}
......@@ -174,6 +178,8 @@ freestruct_in_aaaa(ARGS_FREESTRUCT) {
REQUIRE(source != NULL);
REQUIRE(aaaa->common.rdclass == 1);
REQUIRE(aaaa->common.rdtype == 28);
UNUSED(aaaa);
}
static inline isc_result_t
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: kx_36.c,v 1.31 2000/11/08 01:56:09 bwelling Exp $ */
/* $Id: kx_36.c,v 1.32 2000/12/01 01:40:52 gson Exp $ */
/* Reviewed: Thu Mar 16 17:24:54 PST 2000 by explorer */
......@@ -35,6 +35,8 @@ fromtext_in_kx(ARGS_FROMTEXT) {
REQUIRE(type == 36);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_number,
ISC_FALSE));
if (token.value.as_ulong > 0xffff)
......@@ -86,6 +88,8 @@ fromwire_in_kx(ARGS_FROMWIRE) {
REQUIRE(type == 36);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
dns_name_init(&name, NULL);
......@@ -163,6 +167,8 @@ fromstruct_in_kx(ARGS_FROMSTRUCT) {
REQUIRE(kx->common.rdtype == type);
REQUIRE(kx->common.rdclass == rdclass);
UNUSED(rdclass);
RETERR(uint16_tobuffer(kx->preference, target));
dns_name_toregion(&kx->exchange, &region);
return (isc_buffer_copyregion(target, &region));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: naptr_35.c,v 1.35 2000/11/08 01:56:10 bwelling Exp $ */
/* $Id: naptr_35.c,v 1.36 2000/12/01 01:40:54 gson Exp $ */
/* Reviewed: Thu Mar 16 16:52:50 PST 2000 by bwelling */
......@@ -35,6 +35,8 @@ fromtext_in_naptr(ARGS_FROMTEXT) {
REQUIRE(type == 35);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
/*
* Order.
*/
......@@ -155,6 +157,8 @@ fromwire_in_naptr(ARGS_FROMWIRE) {
REQUIRE(type == 35);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
dns_name_init(&name, NULL);
......@@ -318,6 +322,8 @@ fromstruct_in_naptr(ARGS_FROMSTRUCT) {
REQUIRE((naptr->regexp == NULL && naptr->regexp_len == 0) ||
(naptr->regexp != NULL && naptr->regexp_len != 0));
UNUSED(rdclass);
RETERR(uint16_tobuffer(naptr->order, target));
RETERR(uint16_tobuffer(naptr->preference, target));
RETERR(uint8_tobuffer(naptr->flags_len, target));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsap-ptr_23.c,v 1.26 2000/11/08 01:56:11 bwelling Exp $ */
/* $Id: nsap-ptr_23.c,v 1.27 2000/12/01 01:40:55 gson Exp $ */
/* Reviewed: Fri Mar 17 10:16:02 PST 2000 by gson */
......@@ -35,6 +35,8 @@ fromtext_in_nsap_ptr(ARGS_FROMTEXT) {
REQUIRE(type == 23);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
ISC_FALSE));
......@@ -73,6 +75,8 @@ fromwire_in_nsap_ptr(ARGS_FROMWIRE) {
REQUIRE(type == 23);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
dns_name_init(&name, NULL);
......@@ -133,6 +137,8 @@ fromstruct_in_nsap_ptr(ARGS_FROMSTRUCT) {
REQUIRE(nsap_ptr->common.rdtype == type);
REQUIRE(nsap_ptr->common.rdclass == rdclass);
UNUSED(rdclass);
dns_name_toregion(&nsap_ptr->owner, &region);
return (isc_buffer_copyregion(target, &region));
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: nsap_22.c,v 1.27 2000/11/08 01:56:12 bwelling Exp $ */
/* $Id: nsap_22.c,v 1.28 2000/12/01 01:40:56 gson Exp $ */
/* Reviewed: Fri Mar 17 10:41:07 PST 2000 by gson */
......@@ -39,6 +39,7 @@ fromtext_in_nsap(ARGS_FROMTEXT) {
UNUSED(origin);
UNUSED(downcase);
UNUSED(rdclass);
/* 0x<hex.string.with.periods> */
RETERR(isc_lex_getmastertoken(lexer, &token, isc_tokentype_string,
......@@ -102,6 +103,7 @@ fromwire_in_nsap(ARGS_FROMWIRE) {
UNUSED(dctx);
UNUSED(downcase);
UNUSED(rdclass);
isc_buffer_activeregion(source, &region);
if (region.length < 1)
......@@ -152,6 +154,8 @@ fromstruct_in_nsap(ARGS_FROMSTRUCT) {
REQUIRE((nsap->nsap == NULL && nsap->nsap_len == 0) ||
(nsap->nsap != NULL && nsap->nsap_len != 0));
UNUSED(rdclass);
return (mem_tobuffer(target, nsap->nsap, nsap->nsap_len));
}
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: px_26.c,v 1.28 2000/11/08 01:56:13 bwelling Exp $ */
/* $Id: px_26.c,v 1.29 2000/12/01 01:40:57 gson Exp $ */
/* Reviewed: Mon Mar 20 10:44:27 PST 2000 */
......@@ -35,6 +35,8 @@ fromtext_in_px(ARGS_FROMTEXT) {
REQUIRE(type == 26);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
/*
* Preference.
*/
......@@ -116,6 +118,8 @@ fromwire_in_px(ARGS_FROMWIRE) {
REQUIRE(type == 26);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
dns_name_init(&name, NULL);
......@@ -228,6 +232,8 @@ fromstruct_in_px(ARGS_FROMSTRUCT) {
REQUIRE(px->common.rdtype == type);
REQUIRE(px->common.rdclass == rdclass);
UNUSED(rdclass);
RETERR(uint16_tobuffer(px->preference, target));
dns_name_toregion(&px->map822, &region);
RETERR(isc_buffer_copyregion(target, &region));
......
......@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: srv_33.c,v 1.30 2000/11/08 01:56:14 bwelling Exp $ */
/* $Id: srv_33.c,v 1.31 2000/12/01 01:40:58 gson Exp $ */
/* Reviewed: Fri Mar 17 13:01:00 PST 2000 by bwelling */
......@@ -35,6 +35,8 @@ fromtext_in_srv(ARGS_FROMTEXT) {
REQUIRE(type == 33);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
/*
* Priority.
*/
......@@ -133,6 +135,8 @@ fromwire_in_srv(ARGS_FROMWIRE) {
REQUIRE(type == 33);
REQUIRE(rdclass == 1);
UNUSED(rdclass);
dns_decompress_setmethods(dctx, DNS_COMPRESS_NONE);
dns_name_init(&name, NULL);
......@@ -227,6 +231,8 @@ fromstruct_in_srv(ARGS_FROMSTRUCT) {
REQUIRE(srv->common.rdtype == type);
REQUIRE(srv->common.rdclass == rdclass);
UNUSED(rdclass);
RETERR(uint16_tobuffer(srv->priority, target));
RETERR(uint16_tobuffer(srv->weight, target));
RETERR(uint16_tobuffer(srv->port, target));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment