Commit abe2c84b authored by Mark Andrews's avatar Mark Andrews
Browse files

Suppress cppcheck warnings:

cppcheck-suppress objectIndex
cppcheck-suppress nullPointerRedundantCheck
parent 0cf25d7f
Pipeline #45202 failed with stages
in 22 minutes and 39 seconds
......@@ -362,6 +362,7 @@ main(int argc, char **argv) {
setup_logging(mctx, &log);
if (predecessor == NULL) {
/* cppcheck-suppress nullPointerRedundantCheck */
if (label == NULL) {
fatal("the key label was not specified");
}
......@@ -383,6 +384,7 @@ main(int argc, char **argv) {
isc_result_totext(ret));
}
/* cppcheck-suppress nullPointerRedundantCheck */
if (strchr(label, ':') == NULL) {
char *l;
int len;
......@@ -394,11 +396,13 @@ main(int argc, char **argv) {
label = l;
}
/* cppcheck-suppress nullPointerRedundantCheck */
if (algname == NULL) {
fatal("no algorithm specified");
}
r.base = algname;
/* cppcheck-suppress nullPointerRedundantCheck */
r.length = strlen(algname);
ret = dns_secalg_fromtext(&alg, &r);
if (ret != ISC_R_SUCCESS) {
......
......@@ -1180,10 +1180,12 @@ main(int argc, char **argv) {
}
if (ctx.predecessor == NULL && ctx.policy == NULL) {
/* cppcheck-suppress nullPointerRedundantCheck */
if (algname == NULL) {
fatal("no algorithm specified");
}
r.base = algname;
/* cppcheck-suppress nullPointerRedundantCheck */
r.length = strlen(algname);
ret = dns_secalg_fromtext(&ctx.alg, &r);
if (ret != ISC_R_SUCCESS) {
......
......@@ -1365,7 +1365,9 @@ process_ecs(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
if ((addrlen % 8) != 0) {
uint8_t bits = ~0U << (8 - (addrlen % 8));
/* cppcheck-suppress objectIndex */
bits &= paddr[addrbytes - 1];
/* cppcheck-suppress objectIndex */
if (bits != paddr[addrbytes - 1]) {
return (DNS_R_OPTERR);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment