From 19d50f4da414541d6433acf8fee4f0157c312fde Mon Sep 17 00:00:00 2001 From: Martin Vierula Date: Mon, 20 Dec 2021 09:41:38 -0800 Subject: [PATCH] Add a const to satisfy cppcheck --- src/utils/base64.cc | 2 +- test/cppcheck_suppressions.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/base64.cc b/src/utils/base64.cc index 09bd4c7c..ebbb7393 100644 --- a/src/utils/base64.cc +++ b/src/utils/base64.cc @@ -119,7 +119,7 @@ void Base64::decode_forgiven_engine(unsigned char *plain_text, int i = 0, j = 0, k = 0; int ch = 0; static const char b64_pad = '='; - static int b64_reverse_t[256] = { + static const int b64_reverse_t[256] = { -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -1, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, -1, -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, 62, -2, -2, -2, 63, diff --git a/test/cppcheck_suppressions.txt b/test/cppcheck_suppressions.txt index 930d0715..d2e71cbe 100644 --- a/test/cppcheck_suppressions.txt +++ b/test/cppcheck_suppressions.txt @@ -56,7 +56,6 @@ knownConditionTrueFalse:src/operators/validate_url_encoding.cc:77 knownConditionTrueFalse:src/operators/verify_svnr.cc:87 rethrowNoCurrentException:headers/modsecurity/transaction.h:306 rethrowNoCurrentException:src/rule_with_actions.cc:123 -constVariable:src/utils/base64.cc:122 noExplicitConstructor:seclang-parser.hh constParameter:seclang-parser.hh