From: Mark Andrews Date: Tue, 23 Aug 2005 04:05:50 +0000 (+0000) Subject: silence compiler warnings X-Git-Tag: v9.2.6b1~28^2~30 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=4ba6b6a7ef064e806dd56c8a3a42f1b0f2299404;p=thirdparty%2Fbind9.git silence compiler warnings --- diff --git a/lib/dns/master.c b/lib/dns/master.c index d6cb336466a..87be17855a9 100644 --- a/lib/dns/master.c +++ b/lib/dns/master.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: master.c,v 1.156 2005/07/12 01:00:15 marka Exp $ */ +/* $Id: master.c,v 1.157 2005/08/23 04:05:49 marka Exp $ */ /*! \file */ @@ -2017,7 +2017,7 @@ read_and_check(isc_boolean_t do_read, isc_buffer_t *buffer, return (ISC_R_SUCCESS); } -isc_result_t +static isc_result_t load_raw(dns_loadctx_t *lctx) { isc_result_t result = ISC_R_SUCCESS; isc_boolean_t done = ISC_FALSE; diff --git a/lib/dns/rdata/ch_3/a_1.c b/lib/dns/rdata/ch_3/a_1.c index ff70f4025f1..7ca02c5ae6f 100644 --- a/lib/dns/rdata/ch_3/a_1.c +++ b/lib/dns/rdata/ch_3/a_1.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: a_1.c,v 1.3 2005/06/05 00:01:54 marka Exp $ */ +/* $Id: a_1.c,v 1.4 2005/08/23 04:05:49 marka Exp $ */ /* by Bjorn.Victor@it.uu.se, 2005-05-07 */ /* Based on generic/soa_6.c and generic/mx_15.c */ @@ -58,7 +58,7 @@ fromtext_ch_a(ARGS_FROMTEXT) { /* 16-bit octal address */ RETERR(isc_lex_getoctaltoken(lexer, &token, ISC_FALSE)); - if (token.value.as_ulong > 0xffff) + if (token.value.as_ulong > 0xffffU) RETTOK(ISC_R_RANGE); return (uint16_tobuffer(token.value.as_ulong, target)); } diff --git a/lib/isc/mem.c b/lib/isc/mem.c index c33941ed65e..529a77d6591 100644 --- a/lib/isc/mem.c +++ b/lib/isc/mem.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: mem.c,v 1.123 2005/07/12 01:00:18 marka Exp $ */ +/* $Id: mem.c,v 1.124 2005/08/23 04:05:50 marka Exp $ */ /*! \file */ @@ -319,7 +319,7 @@ quantize(size_t size) { * byte boundaries. */ - if (size == 0) + if (size == 0U) return (ALIGNMENT_SIZE); return ((size + ALIGNMENT_SIZE - 1) & (~(ALIGNMENT_SIZE - 1))); } @@ -340,7 +340,7 @@ more_basic_blocks(isc_mem_t *ctx) { * Did we hit the quota for this context? */ increment = NUM_BASIC_BLOCKS * ctx->mem_target; - if (ctx->quota != 0 && ctx->total + increment > ctx->quota) + if (ctx->quota != 0U && ctx->total + increment > ctx->quota) return (ISC_FALSE); INSIST(ctx->basic_table_count <= ctx->basic_table_size); @@ -441,7 +441,7 @@ more_frags(isc_mem_t *ctx, size_t new_size) { * Add the remaining fragment of the basic block to a free list. */ total_size = rmsize(total_size); - if (total_size > 0) { + if (total_size > 0U) { ((element *)next)->next = ctx->freelists[total_size]; ctx->freelists[total_size] = (element *)next; ctx->stats[total_size].freefrags++; @@ -465,7 +465,7 @@ mem_getunlocked(isc_mem_t *ctx, size_t size) { /* * memget() was called on something beyond our upper limit. */ - if (ctx->quota != 0 && ctx->total + size > ctx->quota) { + if (ctx->quota != 0U && ctx->total + size > ctx->quota) { ret = NULL; goto done; } @@ -549,7 +549,7 @@ mem_putunlocked(isc_mem_t *ctx, void *mem, size_t size) { memset(mem, 0xde, size); /* Mnemonic for "dead". */ #endif (ctx->memfree)(ctx->arg, mem); - INSIST(ctx->stats[ctx->max_size].gets != 0); + INSIST(ctx->stats[ctx->max_size].gets != 0U); ctx->stats[ctx->max_size].gets--; INSIST(size <= ctx->total); ctx->inuse -= size; @@ -576,7 +576,7 @@ mem_putunlocked(isc_mem_t *ctx, void *mem, size_t size) { * max. size (max_size) ends up getting recorded as a call to * max_size. */ - INSIST(ctx->stats[size].gets != 0); + INSIST(ctx->stats[size].gets != 0U); ctx->stats[size].gets--; ctx->stats[new_size].freefrags++; ctx->inuse -= new_size; @@ -763,7 +763,7 @@ isc_mem_createx2(size_t init_max_size, size_t target_size, memset(ctx->stats, 0, (ctx->max_size + 1) * sizeof(struct stats)); if ((flags & ISC_MEMFLAG_INTERNAL) != 0) { - if (target_size == 0) + if (target_size == 0U) ctx->mem_target = DEF_MEM_TARGET; else ctx->mem_target = target_size; @@ -1192,7 +1192,7 @@ isc_mem_stats(isc_mem_t *ctx, FILE *out) { (i == ctx->max_size) ? ">=" : " ", (unsigned long) i, s->totalgets, s->gets); if ((ctx->flags & ISC_MEMFLAG_INTERNAL) != 0 && - (s->blocks != 0 || s->freefrags != 0)) + (s->blocks != 0U || s->freefrags != 0U)) fprintf(out, " (%lu bl, %lu ff)", s->blocks, s->freefrags); fputc('\n', out); diff --git a/lib/isc/string.c b/lib/isc/string.c index 796b79625c6..f6c5e7f7c73 100644 --- a/lib/isc/string.c +++ b/lib/isc/string.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: string.c,v 1.15 2005/06/19 22:56:03 marka Exp $ */ +/* $Id: string.c,v 1.16 2005/08/23 04:05:50 marka Exp $ */ /*! \file */ @@ -96,7 +96,7 @@ isc_string_touint64(char *source, char **end, int base) { isc_result_t isc_string_copy(char *target, size_t size, const char *source) { - REQUIRE(size > 0); + REQUIRE(size > 0U); if (strlcpy(target, source, size) >= size) { memset(target, ISC_STRING_MAGIC, size); @@ -110,7 +110,7 @@ isc_string_copy(char *target, size_t size, const char *source) { void isc_string_copy_truncate(char *target, size_t size, const char *source) { - REQUIRE(size > 0); + REQUIRE(size > 0U); strlcpy(target, source, size); @@ -119,7 +119,7 @@ isc_string_copy_truncate(char *target, size_t size, const char *source) { isc_result_t isc_string_append(char *target, size_t size, const char *source) { - REQUIRE(size > 0); + REQUIRE(size > 0U); REQUIRE(strlen(target) < size); if (strlcat(target, source, size) >= size) { @@ -134,7 +134,7 @@ isc_string_append(char *target, size_t size, const char *source) { void isc_string_append_truncate(char *target, size_t size, const char *source) { - REQUIRE(size > 0); + REQUIRE(size > 0U); REQUIRE(strlen(target) < size); strlcat(target, source, size); @@ -147,7 +147,7 @@ isc_string_printf(char *target, size_t size, const char *format, ...) { va_list args; size_t n; - REQUIRE(size > 0); + REQUIRE(size > 0U); va_start(args, format); n = vsnprintf(target, size, format, args); @@ -168,7 +168,7 @@ isc_string_printf_truncate(char *target, size_t size, const char *format, ...) { va_list args; size_t n; - REQUIRE(size > 0); + REQUIRE(size > 0U); va_start(args, format); n = vsnprintf(target, size, format, args);