diff --git a/lib/dns/qp.c b/lib/dns/qp.c index 07080f5bd2..7156efc4fe 100644 --- a/lib/dns/qp.c +++ b/lib/dns/qp.c @@ -49,7 +49,7 @@ #include "qp_p.h" #ifndef DNS_QP_LOG_STATS -#define DNS_QP_LOG_STATS 1 +#define DNS_QP_LOG_STATS 0 #endif #ifndef DNS_QP_TRACE #define DNS_QP_TRACE 0 @@ -1304,7 +1304,10 @@ dns_qpmulti_commit(dns_qpmulti_t *multi, dns_qp_t **qptp) { */ void dns_qpmulti_rollback(dns_qpmulti_t *multi, dns_qp_t **qptp) { - unsigned int nfree = 0; + /* + * nfree is only used when logging stats, hence the attribute. + */ + unsigned int nfree ISC_ATTR_UNUSED = 0; REQUIRE(QPMULTI_VALID(multi)); REQUIRE(multi->writer.transaction_mode == QP_UPDATE); diff --git a/lib/dns/qp_p.h b/lib/dns/qp_p.h index d61c4a0007..666d6fb9ed 100644 --- a/lib/dns/qp_p.h +++ b/lib/dns/qp_p.h @@ -143,14 +143,14 @@ enum { * size to make the allocator work harder. */ #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -#define QP_CHUNK_LOG_MIN 6 +#define QP_CHUNK_LOG_MIN 7 #define QP_CHUNK_LOG_MAX 7 #else -#define QP_CHUNK_LOG_MIN 6 -#define QP_CHUNK_LOG_MAX 10 +#define QP_CHUNK_LOG_MIN 3 +#define QP_CHUNK_LOG_MAX 12 #endif -STATIC_ASSERT(6 <= QP_CHUNK_LOG_MIN && QP_CHUNK_LOG_MIN <= QP_CHUNK_LOG_MAX, +STATIC_ASSERT(2 <= QP_CHUNK_LOG_MIN && QP_CHUNK_LOG_MIN <= QP_CHUNK_LOG_MAX, "qp-trie min chunk size is unreasonable"); STATIC_ASSERT(6 <= QP_CHUNK_LOG_MAX && QP_CHUNK_LOG_MAX <= 20, "qp-trie max chunk size is unreasonable");