From c94f485c4b3d8f7726b009d73b2ed0e5d86ed6d1 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Thu, 11 May 2000 22:48:12 +0000 Subject: [PATCH] use the UNUSED() macro --- lib/dns/sec/dst/openssl_link.c | 7 ++++--- lib/dns/sec/dst/openssldh_link.c | 11 ++++++----- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/dns/sec/dst/openssl_link.c b/lib/dns/sec/dst/openssl_link.c index c4e6b5fdd4..3c0acdfecb 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.20 2000/05/11 22:47:00 gson Exp $ + * $Id: openssl_link.c,v 1.21 2000/05/11 22:48:12 gson Exp $ */ #if defined(OPENSSL) @@ -516,11 +516,12 @@ dst_openssl_from_file(dst_key_t *key, const isc_uint16_t id, isc_mem_t *mctx) { static void dst_openssl_destroy(void *key, isc_mem_t *mctx) { DSA *dsa = (DSA *) key; + + UNUSED(mctx); + if (dsa == NULL) return; - mctx = mctx; /* make the compiler happy */ - DSA_free(dsa); } diff --git a/lib/dns/sec/dst/openssldh_link.c b/lib/dns/sec/dst/openssldh_link.c index 37426580cf..401b7c4dd0 100644 --- a/lib/dns/sec/dst/openssldh_link.c +++ b/lib/dns/sec/dst/openssldh_link.c @@ -19,7 +19,7 @@ /* * Principal Author: Brian Wellington - * $Id: openssldh_link.c,v 1.13 2000/05/09 22:22:16 tale Exp $ + * $Id: openssldh_link.c,v 1.14 2000/05/11 22:47:02 gson Exp $ */ #if defined(OPENSSL) @@ -255,7 +255,7 @@ dst_openssldh_from_dns(dst_key_t *key, isc_buffer_t *data, isc_mem_t *mctx) { isc_uint16_t plen, glen, publen; int special = 0; - mctx = mctx; /* make the compiler happy */ + UNUSED(mctx); isc_buffer_remainingregion(data, &r); if (r.length == 0) @@ -521,11 +521,12 @@ dst_openssldh_from_file(dst_key_t *key, const isc_uint16_t id, static void dst_openssldh_destroy(void *key, isc_mem_t *mctx) { DH *dh = (DH *) key; + + UNUSED(mctx); + if (dh == NULL) return; - mctx = mctx; /* make the compiler happy */ - if (dh->p == &bn768 || dh->p == &bn1024) dh->p = NULL; if (dh->g == &bn2) @@ -553,7 +554,7 @@ dst_openssldh_generate(dst_key_t *key, int generator, isc_mem_t *mctx) { isc_buffer_t dns; isc_region_t r; - mctx = mctx; /* make the compiler happy */ + UNUSED(mctx); if (generator == 0) { if (key->key_size == 768 || key->key_size == 1024) {