mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 14:35:26 +00:00
silence compiler warnings
This commit is contained in:
@@ -170,7 +170,7 @@
|
|||||||
* a cache. Only effective when a finite max-cache-size is specified.
|
* a cache. Only effective when a finite max-cache-size is specified.
|
||||||
* This is currently defined to be 8MB.
|
* This is currently defined to be 8MB.
|
||||||
*/
|
*/
|
||||||
#define MAX_ADB_SIZE_FOR_CACHESHARE 8388608
|
#define MAX_ADB_SIZE_FOR_CACHESHARE 8388608U
|
||||||
|
|
||||||
struct ns_dispatch {
|
struct ns_dispatch {
|
||||||
isc_sockaddr_t addr;
|
isc_sockaddr_t addr;
|
||||||
@@ -2686,9 +2686,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_FOR_CACHESHARE when the cache is shared.
|
||||||
*/
|
*/
|
||||||
max_adb_size = 0;
|
max_adb_size = 0;
|
||||||
if (max_cache_size != 0) {
|
if (max_cache_size != 0U) {
|
||||||
max_adb_size = max_cache_size / 8;
|
max_adb_size = max_cache_size / 8;
|
||||||
if (max_adb_size == 0)
|
if (max_adb_size == 0U)
|
||||||
max_adb_size = 1; /* Force minimum. */
|
max_adb_size = 1; /* Force minimum. */
|
||||||
if (view != nsc->primaryview &&
|
if (view != nsc->primaryview &&
|
||||||
max_adb_size > MAX_ADB_SIZE_FOR_CACHESHARE) {
|
max_adb_size > MAX_ADB_SIZE_FOR_CACHESHARE) {
|
||||||
|
@@ -73,10 +73,10 @@
|
|||||||
* (XXX simply derived from definitions in cache.c There may be better
|
* (XXX simply derived from definitions in cache.c There may be better
|
||||||
* constants here.)
|
* constants here.)
|
||||||
*/
|
*/
|
||||||
#define DNS_ACACHE_MINSIZE 2097152 /* Bytes. 2097152 = 2 MB */
|
#define DNS_ACACHE_MINSIZE 2097152U /* Bytes. 2097152 = 2 MB */
|
||||||
#define DNS_ACACHE_CLEANERINCREMENT 1000 /* Number of entries. */
|
#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)
|
#if defined(ISC_RWLOCK_USEATOMIC) && defined(ISC_PLATFORM_HAVEATOMICSTORE)
|
||||||
#define ACACHE_USE_RWLOCK 1
|
#define ACACHE_USE_RWLOCK 1
|
||||||
@@ -1774,13 +1774,13 @@ dns_acache_setcachesize(dns_acache_t *acache, size_t size) {
|
|||||||
|
|
||||||
REQUIRE(DNS_ACACHE_VALID(acache));
|
REQUIRE(DNS_ACACHE_VALID(acache));
|
||||||
|
|
||||||
if (size != 0 && size < DNS_ACACHE_MINSIZE)
|
if (size != 0U && size < DNS_ACACHE_MINSIZE)
|
||||||
size = DNS_ACACHE_MINSIZE;
|
size = DNS_ACACHE_MINSIZE;
|
||||||
|
|
||||||
hiwater = size - (size >> 3);
|
hiwater = size - (size >> 3);
|
||||||
lowater = size - (size >> 2);
|
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);
|
isc_mem_setwater(acache->mctx, water, acache, 0, 0);
|
||||||
else
|
else
|
||||||
isc_mem_setwater(acache->mctx, water, acache,
|
isc_mem_setwater(acache->mctx, water, acache,
|
||||||
|
@@ -89,7 +89,7 @@
|
|||||||
|
|
||||||
#define DNS_ADB_INVALIDBUCKET (-1) /*%< invalid bucket address */
|
#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 ISC_LIST(dns_adbname_t) dns_adbnamelist_t;
|
||||||
typedef struct dns_adbnamehook dns_adbnamehook_t;
|
typedef struct dns_adbnamehook dns_adbnamehook_t;
|
||||||
@@ -4169,13 +4169,13 @@ dns_adb_setadbsize(dns_adb_t *adb, size_t size) {
|
|||||||
|
|
||||||
INSIST(DNS_ADB_VALID(adb));
|
INSIST(DNS_ADB_VALID(adb));
|
||||||
|
|
||||||
if (size != 0 && size < DNS_ADB_MINADBSIZE)
|
if (size != 0U && size < DNS_ADB_MINADBSIZE)
|
||||||
size = DNS_ADB_MINADBSIZE;
|
size = DNS_ADB_MINADBSIZE;
|
||||||
|
|
||||||
hiwater = size - (size >> 3); /* Approximately 7/8ths. */
|
hiwater = size - (size >> 3); /* Approximately 7/8ths. */
|
||||||
lowater = size - (size >> 2); /* Approximately 3/4ths. */
|
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);
|
isc_mem_setwater(adb->mctx, water, adb, 0, 0);
|
||||||
else
|
else
|
||||||
isc_mem_setwater(adb->mctx, water, adb, hiwater, lowater);
|
isc_mem_setwater(adb->mctx, water, adb, hiwater, lowater);
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
* DNS_CACHE_MINSIZE is how many bytes is the floor for dns_cache_setcachesize().
|
* DNS_CACHE_MINSIZE is how many bytes is the floor for dns_cache_setcachesize().
|
||||||
* See also DNS_CACHE_CLEANERINCREMENT
|
* 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.
|
* Control incremental cleaning.
|
||||||
* CLEANERINCREMENT is how many nodes are examined in one pass.
|
* CLEANERINCREMENT is how many nodes are examined in one pass.
|
||||||
@@ -1057,7 +1057,7 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
|
|||||||
* Impose a minimum cache size; pathological things happen if there
|
* Impose a minimum cache size; pathological things happen if there
|
||||||
* is too little room.
|
* is too little room.
|
||||||
*/
|
*/
|
||||||
if (size != 0 && size < DNS_CACHE_MINSIZE)
|
if (size != 0U && size < DNS_CACHE_MINSIZE)
|
||||||
size = DNS_CACHE_MINSIZE;
|
size = DNS_CACHE_MINSIZE;
|
||||||
|
|
||||||
LOCK(&cache->lock);
|
LOCK(&cache->lock);
|
||||||
@@ -1074,7 +1074,7 @@ dns_cache_setcachesize(dns_cache_t *cache, size_t size) {
|
|||||||
* water().
|
* water().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (size == 0 || hiwater == 0 || lowater == 0)
|
if (size == 0U || hiwater == 0U || lowater == 0U)
|
||||||
/*
|
/*
|
||||||
* Disable cache memory limiting.
|
* Disable cache memory limiting.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user