Commit eab2fb73 authored by Mark Andrews's avatar Mark Andrews
Browse files

silence compiler warnings [RT #17079]

parent 52dec699
......@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: statschannel.c,v 1.21 2009/01/29 05:11:29 marka Exp $ */
/* $Id: statschannel.c,v 1.22 2009/02/17 03:40:28 marka Exp $ */
/*! \file */
......@@ -130,10 +130,10 @@ init_desc(void) {
int i;
/* Initialize name server statistics */
memset(nsstats_desc, 0,
memset((void *)nsstats_desc, 0,
dns_nsstatscounter_max * sizeof(nsstats_desc[0]));
#ifdef HAVE_LIBXML2
memset(nsstats_xmldesc, 0,
memset((void *)nsstats_xmldesc, 0,
dns_nsstatscounter_max * sizeof(nsstats_xmldesc[0]));
#endif
......@@ -198,10 +198,10 @@ init_desc(void) {
INSIST(i == dns_nsstatscounter_max);
/* Initialize resolver statistics */
memset(resstats_desc, 0,
memset((void *)resstats_desc, 0,
dns_resstatscounter_max * sizeof(resstats_desc[0]));
#ifdef HAVE_LIBXML2
memset(resstats_xmldesc, 0,
memset((void *)resstats_xmldesc, 0,
dns_resstatscounter_max * sizeof(resstats_xmldesc[0]));
#endif
......@@ -268,10 +268,10 @@ init_desc(void) {
INSIST(i == dns_resstatscounter_max);
/* Initialize zone statistics */
memset(zonestats_desc, 0,
memset((void *)zonestats_desc, 0,
dns_zonestatscounter_max * sizeof(zonestats_desc[0]));
#ifdef HAVE_LIBXML2
memset(zonestats_xmldesc, 0,
memset((void *)zonestats_xmldesc, 0,
dns_zonestatscounter_max * sizeof(zonestats_xmldesc[0]));
#endif
......@@ -300,10 +300,10 @@ init_desc(void) {
INSIST(i == dns_zonestatscounter_max);
/* Initialize socket statistics */
memset(sockstats_desc, 0,
memset((void *)sockstats_desc, 0,
isc_sockstatscounter_max * sizeof(sockstats_desc[0]));
#ifdef HAVE_LIBXML2
memset(sockstats_xmldesc, 0,
memset((void *)sockstats_xmldesc, 0,
isc_sockstatscounter_max * sizeof(sockstats_xmldesc[0]));
#endif
......
......@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: check.c,v 1.97 2009/01/17 23:47:42 tbox Exp $ */
/* $Id: check.c,v 1.98 2009/02/17 03:40:28 marka Exp $ */
/*! \file */
......@@ -909,8 +909,11 @@ validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
if (new == NULL)
goto cleanup;
if (stackcount != 0) {
void *ptr;
DE_CONST(stack, ptr);
memcpy(new, stack, oldsize);
isc_mem_put(mctx, stack, oldsize);
isc_mem_put(mctx, ptr, oldsize);
}
stack = new;
stackcount = newlen;
......@@ -923,8 +926,12 @@ validate_masters(const cfg_obj_t *obj, const cfg_obj_t *config,
goto resume;
}
cleanup:
if (stack != NULL)
isc_mem_put(mctx, stack, stackcount * sizeof(*stack));
if (stack != NULL) {
void *ptr;
DE_CONST(stack, ptr);
isc_mem_put(mctx, ptr, stackcount * sizeof(*stack));
}
isc_symtab_destroy(&symtab);
*countp = count;
return (result);
......
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