]> 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:41 +0000 (23:46 +1100)
bin/named/server.c
lib/dns/acache.c
lib/dns/adb.c
lib/dns/cache.c

index 43ae1918a57759d8588d46b7f499abcc623e5d30..d0ae6f7a81233f0cf98cb5e00bbc4367ea852a32 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;
@@ -2297,9 +2297,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 702fb98457793656335ef536b962de322df0601b..8ddd097ae2e9b4873cac8e31e6647a8df555fd3d 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
@@ -1775,13 +1775,13 @@ dns_acache_setcachesize(dns_acache_t *acache, isc_uint32_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 79179d3068bbf7727dfbbb76533a48d5550f8725..4a9d18e4e8ca815843b55583a1a8fd5bac6c5857 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;
@@ -4134,13 +4134,13 @@ dns_adb_setadbsize(dns_adb_t *adb, isc_uint32_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 56bff8d9d8d796c2941e610eb6f96b0886309f68..e0d7752e9e76186df9cb9dc758c8bbe4ce0fdf91 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.
@@ -1038,7 +1038,7 @@ dns_cache_setcachesize(dns_cache_t *cache, isc_uint32_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);
@@ -1055,7 +1055,7 @@ dns_cache_setcachesize(dns_cache_t *cache, isc_uint32_t size) {
         * water().
         */
 
-       if (size == 0 || hiwater == 0 || lowater == 0)
+       if (size == 0U || hiwater == 0U || lowater == 0U)
                /*
                 * Disable cache memory limiting.
                 */