From fd9f6afdff9faf55411dfd5f828529601cab0511 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 11 May 2000 22:47:00 +0000 Subject: [PATCH] use the UNUSED() macro --- bin/tests/dst/t_dst.c | 3 ++- lib/dns/rdata/generic/unspec_103.c | 14 +++++++------- lib/dns/rdatalist.c | 2 +- lib/dns/sec/dst/openssl_link.c | 8 ++++---- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/bin/tests/dst/t_dst.c b/bin/tests/dst/t_dst.c index b1f7610e9f..333a31a88b 100644 --- a/bin/tests/dst/t_dst.c +++ b/bin/tests/dst/t_dst.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -123,7 +124,7 @@ dh(char *name1, int id1, char *name2, int id2, isc_mem_t *mctx, isc_buffer_t b1, b2; isc_region_t r1, r2; - exp_result = exp_result; /* unused */ + UNUSED(exp_result); p = getcwd(current, PATH_MAX);; if (p == NULL) { diff --git a/lib/dns/rdata/generic/unspec_103.c b/lib/dns/rdata/generic/unspec_103.c index 908761d4e5..bdb6463f4a 100644 --- a/lib/dns/rdata/generic/unspec_103.c +++ b/lib/dns/rdata/generic/unspec_103.c @@ -15,7 +15,7 @@ * SOFTWARE. */ -/* $Id: unspec_103.c,v 1.17 2000/05/05 05:50:11 marka Exp $ */ +/* $Id: unspec_103.c,v 1.18 2000/05/11 22:43:38 gson Exp $ */ #ifndef RDATA_GENERIC_UNSPEC_103_C #define RDATA_GENERIC_UNSPEC_103_C @@ -41,11 +41,10 @@ static inline isc_result_t totext_unspec(dns_rdata_t *rdata, dns_rdata_textctx_t *tctx, isc_buffer_t *target) { - REQUIRE(rdata->type == 103); - tctx = tctx; /*unused*/ + UNUSED(tctx); return (btoa_totext(rdata->data, rdata->length, target)); } @@ -59,9 +58,10 @@ fromwire_unspec(dns_rdataclass_t rdclass, dns_rdatatype_t type, REQUIRE(type == 103); - rdclass = rdclass; /*unused*/ - dctx = dctx; /*unused*/ - downcase = downcase; /*unused*/ + UNUSED(rdclass); + UNUSED(dctx); + UNUSED(downcase); + isc_buffer_activeregion(source, &sr); isc_buffer_forward(source, sr.length); return (mem_tobuffer(target, sr.base, sr.length)); @@ -72,7 +72,7 @@ towire_unspec(dns_rdata_t *rdata, dns_compress_t *cctx, isc_buffer_t *target) { REQUIRE(rdata->type == 103); - cctx = cctx; /*unused*/ + UNUSED(cctx); return (mem_tobuffer(target, rdata->data, rdata->length)); } diff --git a/lib/dns/rdatalist.c b/lib/dns/rdatalist.c index 5442f9eb9a..fb04b8f833 100644 --- a/lib/dns/rdatalist.c +++ b/lib/dns/rdatalist.c @@ -85,7 +85,7 @@ dns_rdatalist_tordataset(dns_rdatalist_t *rdatalist, static void rdatalist_disassociate(dns_rdataset_t *rdataset) { - (void)rdataset; /* Keep compiler quiet. */ + UNUSED(rdataset); } static isc_result_t diff --git a/lib/dns/sec/dst/openssl_link.c b/lib/dns/sec/dst/openssl_link.c index 4576642720..c4e6b5fdd4 100644 --- a/lib/dns/sec/dst/openssl_link.c +++ b/lib/dns/sec/dst/openssl_link.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: openssl_link.c,v 1.19 2000/05/08 14:37:08 tale Exp $ + * $Id: openssl_link.c,v 1.20 2000/05/11 22:47:00 gson Exp $ */ #if defined(OPENSSL) @@ -323,7 +323,7 @@ dst_openssl_from_dns(dst_key_t *key, isc_buffer_t *data, isc_mem_t *mctx) { isc_region_t r; unsigned int t, p_bytes; - mctx = mctx; /* make the compiler happy */ + UNUSED(mctx); isc_buffer_remainingregion(data, &r); if (r.length == 0) @@ -546,8 +546,8 @@ dst_openssl_generate(dst_key_t *key, int unused, isc_mem_t *mctx) { isc_result_t ret; isc_region_t r; - unused = unused; /* make the compiler happy */ - mctx = mctx; /* make the compiler happy */ + UNUSED(unused); + UNUSED(mctx); isc_buffer_init(&rand, rand_array, sizeof(rand_array)); ret = dst_random_get(SHA_DIGEST_LENGTH, &rand);