]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Remove randomly scattered additional style check suppressions that caused unmatchedSu...
authorOndřej Surý <ondrej@sury.org>
Fri, 27 Sep 2019 10:48:23 +0000 (12:48 +0200)
committerOndřej Surý <ondrej@sury.org>
Thu, 3 Oct 2019 07:50:27 +0000 (09:50 +0200)
(cherry picked from commit a0d3614a609bc9e5af39f2282daac78c40ab6363)

lib/dns/ecdb.c
lib/dns/openssldh_link.c
lib/dns/opensslrsa_link.c
lib/dns/rcode.c
lib/dns/ttl.c
lib/isc/sockaddr.c
lib/isc/tests/random_test.c
lib/isc/unix/resource.c

index c70c7b68b99fb4d5db2e0b0896e189d41cb117a1..5af455e8447537f3fd91f4059f9a09d7b4d22af2 100644 (file)
@@ -771,7 +771,6 @@ rdatasetiter_destroy(dns_rdatasetiter_t **iteratorp) {
        REQUIRE(iteratorp != NULL);
        REQUIRE(DNS_RDATASETITER_VALID(*iteratorp));
 
-       /* cppcheck-suppress unreadVariable */
        u.rdatasetiterator = *iteratorp;
        *iteratorp = NULL;
 
index c93f8127b1ad838bce98d77ccfb22127ae7e6e0f..3567d3d4472261dd72f9d898aaf4e3edefb4a753 100644 (file)
@@ -245,7 +245,6 @@ progress_cb(int p, int n, BN_GENCB *cb) {
 
        UNUSED(n);
 
-       /* cppcheck-suppress unreadVariable */
        u.dptr = BN_GENCB_get_arg(cb);
        if (u.fptr != NULL)
                u.fptr(p);
@@ -306,7 +305,6 @@ openssldh_generate(dst_key_t *key, int generator, void (*callback)(int)) {
                if (callback == NULL) {
                        BN_GENCB_set_old(cb, NULL, NULL);
                } else {
-                       /* cppcheck-suppress unreadVariable */
                        u.fptr = callback;
                        BN_GENCB_set(cb, &progress_cb, u.dptr);
                }
index 7e7d7e6a973584a3222ea043b5524d756dae6f31..8425b86dfd6912d43569bf92e1739ec962877813 100644 (file)
@@ -428,7 +428,6 @@ progress_cb(int p, int n, BN_GENCB *cb) {
 
        UNUSED(n);
 
-       /* cppcheck-suppress unreadVariable */
        u.dptr = BN_GENCB_get_arg(cb);
        if (u.fptr != NULL)
                u.fptr(p);
@@ -497,7 +496,6 @@ opensslrsa_generate(dst_key_t *key, int exp, void (*callback)(int)) {
        if (callback == NULL) {
                BN_GENCB_set_old(cb, NULL, NULL);
        } else {
-               /* cppcheck-suppress unreadVariable */
                u.fptr = callback;
                BN_GENCB_set(cb, &progress_cb, u.dptr);
        }
index 5807a30716438cbc014908dea8fa0e53cd02e683..147e5a41f33345b06d1cd6d688fdbb5f6f81cec6 100644 (file)
@@ -364,7 +364,6 @@ dns_secalg_format(dns_secalg_t alg, char *cp, unsigned int size) {
        isc_buffer_usedregion(&b, &r);
        r.base[r.length] = 0;
        if (result != ISC_R_SUCCESS) {
-               /* cppcheck-suppress unreadVariable */
                r.base[0] = 0;
        }
 }
@@ -464,7 +463,6 @@ dns_dsdigest_format(dns_dsdigest_t typ, char *cp, unsigned int size) {
        isc_buffer_usedregion(&b, &r);
        r.base[r.length] = 0;
        if (result != ISC_R_SUCCESS) {
-               /* cppcheck-suppress unreadVariable */
                r.base[0] = 0;
        }
 }
index 0c545e258166606ffcb3940a4806d17a5d892985..c30d54af6b048613055b1b455fc05f4ceccef2b3 100644 (file)
@@ -123,7 +123,6 @@ dns_ttl_totext(uint32_t src, bool verbose,
                 * here because region.base is type unsigned char *.
                 */
                isc_buffer_usedregion(target, &region);
-               /* cppcheck-suppress unreadVariable */
                region.base[region.length - 1] =
                        toupper(region.base[region.length - 1]);
        }
index 6e904b7be1e8a2bcac6d9259f03157fbb72b16ca..bb28291aab34a6fb850ec7927da3859e04a79550 100644 (file)
@@ -166,7 +166,6 @@ isc_sockaddr_totext(const isc_sockaddr_t *sockaddr, isc_buffer_t *target) {
         */
        isc_buffer_availableregion(target, &avail);
        INSIST(avail.length >= 1);
-       /* cppcheck-suppress unreadVariable */
        avail.base[0] = '\0';
 
        return (ISC_R_SUCCESS);
index 6b3d3117946365b97c7638385970ed5951e94692..45bfae4090b67fb72055d1016957fff07e46bec3 100644 (file)
@@ -545,7 +545,6 @@ blockfrequency(isc_mem_t *mctx, uint16_t *values, size_t length) {
 
        /* Preconditions (section 2.2.7 in NIST SP 800-22) */
        assert_true(numbits >= 100);
-       /* cppcheck-suppress constArgument */
        assert_true(mbits >= 20);
        assert_true((double) mbits > (0.01 * numbits));
        assert_true(numblocks < 100);
index 47d9301a58932bc8b44e1d179bdbc8e9a6dffbab..b3567ef9c0f002b5f80f7a19351331ddc16e064f 100644 (file)
@@ -167,7 +167,6 @@ isc_resource_setlimit(isc_resource_t resource, isc_resourcevalue_t value) {
                        return (ISC_R_SUCCESS);
        }
 #endif
-       /* cppcheck-suppress duplicateCondition */
        if (resource == isc_resource_openfiles && rlim_value == RLIM_INFINITY) {
                if (getrlimit(unixresource, &rl) == 0) {
                        rl.rlim_cur = rl.rlim_max;