]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warnings
authorMark Andrews <marka@isc.org>
Tue, 23 Aug 2005 04:05:50 +0000 (04:05 +0000)
committerMark Andrews <marka@isc.org>
Tue, 23 Aug 2005 04:05:50 +0000 (04:05 +0000)
lib/dns/master.c
lib/dns/rdata/ch_3/a_1.c
lib/isc/mem.c
lib/isc/string.c

index d6cb336466a340e45db01ffa901d202c1fd826ac..87be17855a9a9d98eb4fe7fac9e9e6651d43dcd8 100644 (file)
@@ -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;
index ff70f4025f1d0d8d88a1102cb1dfe0234c437103..7ca02c5ae6fdd6203f27c72a079b48388d47e237 100644 (file)
@@ -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));
 }
index c33941ed65ebb4294295bbd678487bd2d0473583..529a77d659182288f4f2ec8fecfa9fc04b3cec76 100644 (file)
@@ -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);
index 796b79625c68f38ab221671b150a73e019f5c914..f6c5e7f7c7309c41fdf716c8ef9ca31859405a2e 100644 (file)
@@ -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);