mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
cppcheck: make static analysis more pedantic
This commit is contained in:
@@ -36,13 +36,13 @@ void CustomDebugLog::write(int level, const std::string &id,
|
||||
m_log << msgf << std::endl;
|
||||
}
|
||||
|
||||
bool CustomDebugLog::contains(const std::string& pattern) {
|
||||
bool const CustomDebugLog::contains(const std::string& pattern) const {
|
||||
modsecurity::Utils::Regex re(pattern);
|
||||
std::string s = m_log.str();
|
||||
return modsecurity::Utils::regex_search(s, re);
|
||||
}
|
||||
|
||||
std::string CustomDebugLog::log_messages() {
|
||||
std::string const CustomDebugLog::log_messages() const {
|
||||
return m_log.str();
|
||||
}
|
||||
|
||||
|
@@ -31,8 +31,8 @@ class CustomDebugLog : public modsecurity::debug_log::DebugLog {
|
||||
void write(int level, const std::string& message) override;
|
||||
void write(int level, const std::string &id,
|
||||
const std::string &uri, const std::string &msg) override;
|
||||
bool contains(const std::string& pattern);
|
||||
std::string log_messages();
|
||||
bool const contains(const std::string& pattern) const;
|
||||
std::string const log_messages() const;
|
||||
std::string error_log_messages();
|
||||
int getDebugLogLevel() override;
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
namespace modsecurity_test {
|
||||
|
||||
std::string RegressionTest::print() {
|
||||
const std::string RegressionTest::print() {
|
||||
std::stringstream i;
|
||||
|
||||
#if 0
|
||||
|
@@ -33,7 +33,7 @@ class RegressionTest {
|
||||
public:
|
||||
static RegressionTest *from_yajl_node(const yajl_val &);
|
||||
|
||||
std::string print();
|
||||
const std::string print();
|
||||
std::string filename;
|
||||
std::string name;
|
||||
std::string title;
|
||||
|
Reference in New Issue
Block a user