]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
silence compiler warnings
authorMark Andrews <marka@isc.org>
Tue, 5 Mar 2013 12:41:22 +0000 (23:41 +1100)
committerMark Andrews <marka@isc.org>
Tue, 5 Mar 2013 12:46:07 +0000 (23:46 +1100)
bin/named/server.c
lib/dns/acache.c
lib/dns/adb.c
lib/dns/cache.c

index a90cb4cf4ad86eecc67b9aae831e6bed0f7911db..d74deb44ce54303955f5362bda5e2d0b27b43f95 100644 (file)
  * a cache.  Only effective when a finite max-cache-size is specified.
  * This is currently defined to be 8MB.
  */
-#define MAX_ADB_SIZE_FOR_CACHESHARE    8388608
+#define MAX_ADB_SIZE_FOR_CACHESHARE    8388608U
 
 struct ns_dispatch {
        isc_sockaddr_t                  addr;
@@ -2317,9 +2317,9 @@ configure_view(dns_view_t *view, cfg_obj_t *config, cfg_obj_t *vconfig,
         * MAX_ADB_SIZE_FOR_CACHESHARE when the cache is shared.
         */
        max_adb_size = 0;
-       if (max_cache_size != 0) {
+       if (max_cache_size != 0U) {
                max_adb_size = max_cache_size / 8;
-               if (max_adb_size == 0)
+               if (max_adb_size == 0U)
                        max_adb_size = 1;       /* Force minimum. */
                if (view != nsc->primaryview &&
                    max_adb_size > MAX_ADB_SIZE_FOR_CACHESHARE) {
index 7fc9a3230d599e4160a13d2600bf0332fbcfd52e..d8d5535c245163690681899938d5008b7da780e4 100644 (file)
  * (XXX simply derived from definitions in cache.c  There may be better
  *  constants here.)
  */
-#define DNS_ACACHE_MINSIZE             2097152 /* Bytes.  2097152 = 2 MB */
-#define DNS_ACACHE_CLEANERINCREMENT    1000    /* Number of entries. */
+#define DNS_ACACHE_MINSIZE             2097152U /* Bytes.  2097152 = 2 MB */
+#define DNS_ACACHE_CLEANERINCREMENT    1000     /* Number of entries. */
 
-#define DEFAULT_ACACHE_ENTRY_LOCK_COUNT        1009    /*%< Should be prime. */
+#define DEFAULT_ACACHE_ENTRY_LOCK_COUNT        1009     /*%< Should be prime. */
 
 #if defined(ISC_RWLOCK_USEATOMIC) && defined(ISC_PLATFORM_HAVEATOMICSTORE)
 #define ACACHE_USE_RWLOCK 1
@@ -1774,13 +1774,13 @@ dns_acache_setcachesize(dns_acache_t *acache, size_t size) {
 
        REQUIRE(DNS_ACACHE_VALID(acache));
 
-       if (size != 0 && size < DNS_ACACHE_MINSIZE)
+       if (size != 0U && size < DNS_ACACHE_MINSIZE)
                size = DNS_ACACHE_MINSIZE;
 
        hiwater = size - (size >> 3);
        lowater = size - (size >> 2);
 
-       if (size == 0 || hiwater == 0 || lowater == 0)
+       if (size == 0U || hiwater == 0U || lowater == 0U)
                isc_mem_setwater(acache->mctx, water, acache, 0, 0);
        else
                isc_mem_setwater(acache->mctx, water, acache,
index 7b5ca12b18e1e78be7cd132aa7aa047c8a03f6d1..e6af11808fcfd0167f2f57072a6261937f8438c1 100644 (file)
@@ -89,7 +89,7 @@
 
 #define DNS_ADB_INVALIDBUCKET (-1)      /*%< invalid bucket address */
 
-#define DNS_ADB_MINADBSIZE      (1024*1024)     /*%< 1 Megabyte */
+#define DNS_ADB_MINADBSIZE      (1024U*1024U)     /*%< 1 Megabyte */
 
 typedef ISC_LIST(dns_adbname_t) dns_adbnamelist_t;
 typedef struct dns_adbnamehook dns_adbnamehook_t;
@@ -4133,13 +4133,13 @@ dns_adb_setadbsize(dns_adb_t *adb, size_t size) {
 
        INSIST(DNS_ADB_VALID(adb));
 
-       if (size != 0 && size < DNS_ADB_MINADBSIZE)
+       if (size != 0U && size < DNS_ADB_MINADBSIZE)
                size = DNS_ADB_MINADBSIZE;
 
        hiwater = size - (size >> 3);   /* Approximately 7/8ths. */
        lowater = size - (size >> 2);   /* Approximately 3/4ths. */
 
-       if (size == 0 || hiwater == 0 || lowater == 0)
+       if (size == 0U || hiwater == 0U || lowater == 0U)
                isc_mem_setwater(adb->mctx, water, adb, 0, 0);
        else
                isc_mem_setwater(adb->mctx, water, adb, hiwater, lowater);
index ac6c92527e610e31438b503609e0b9367bc20988..d0f05b9a09ab2117aee1cbe1dc567345a19a0d3e 100644 (file)
@@ -50,7 +50,7 @@
  * DNS_CACHE_MINSIZE is how many bytes is the floor for dns_cache_setcachesize().
  * See also DNS_CACHE_CLEANERINCREMENT
  */
-#define DNS_CACHE_MINSIZE      2097152 /*%< Bytes.  2097152 = 2 MB */
+#define DNS_CACHE_MINSIZE      2097152U /*%< Bytes.  2097152 = 2 MB */
 /*!
  * Control incremental cleaning.
  * CLEANERINCREMENT is how many nodes are examined in one pass.
@@ -1037,7 +1037,7 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
         * Impose a minimum cache size; pathological things happen if there
         * is too little room.
         */
-       if (size != 0 && size < DNS_CACHE_MINSIZE)
+       if (size != 0U && size < DNS_CACHE_MINSIZE)
                size = DNS_CACHE_MINSIZE;
 
        LOCK(&cache->lock);
@@ -1054,7 +1054,7 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
         * water().
         */
 
-       if (size == 0 || hiwater == 0 || lowater == 0)
+       if (size == 0U || hiwater == 0U || lowater == 0U)
                /*
                 * Disable cache memory limiting.
                 */