mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 01:51:52 +03:00
cppcheck: make static analysis more pedantic
This commit is contained in:
@@ -32,9 +32,10 @@ class Base64 {
|
||||
static std::string decode(const std::string& data);
|
||||
static std::string decode_forgiven(const std::string& data);
|
||||
|
||||
static void decode_forgiven_engine(unsigned char *output,
|
||||
size_t output_size, size_t *aiming_size, const unsigned char *input,
|
||||
size_t input_size);
|
||||
static void decode_forgiven_engine(unsigned char *plain_text,
|
||||
size_t plain_text_size, size_t *aiming_size,
|
||||
const unsigned char *encoded,
|
||||
size_t input_len);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ bool GeoLookup::setDataBase(const std::string& filePath,
|
||||
|
||||
|
||||
bool GeoLookup::lookup(const std::string& target, Transaction *trans,
|
||||
std::function<bool(int, std::string)> debug) {
|
||||
std::function<bool(int, std::string)> debug) const {
|
||||
|
||||
if (m_version == NOT_LOADED) {
|
||||
if (debug) {
|
||||
|
||||
@@ -49,8 +49,8 @@ class GeoLookup {
|
||||
bool setDataBase(const std::string& filePath, std::string *err);
|
||||
void cleanUp();
|
||||
|
||||
bool lookup(const std::string& target, Transaction *t,
|
||||
std::function<bool(int, std::string)> callback);
|
||||
bool lookup(const std::string& target, Transaction *transaction,
|
||||
std::function<bool(int, std::string)> debug) const;
|
||||
|
||||
private:
|
||||
GeoLookup() :
|
||||
|
||||
@@ -50,8 +50,8 @@ void HttpsClient::setKey(const std::string& key) {
|
||||
m_key = "ModSec-key: " + key;
|
||||
}
|
||||
|
||||
void HttpsClient::setRequestBody(const std::string& requestBody) {
|
||||
m_requestBody = requestBody;
|
||||
void HttpsClient::setRequestBody(const std::string& requestType) {
|
||||
m_requestBody = requestType;
|
||||
}
|
||||
|
||||
void HttpsClient::setRequestType(const std::string& requestType) {
|
||||
|
||||
@@ -58,7 +58,7 @@ class Regex {
|
||||
Regex& operator=(const Regex&) = delete;
|
||||
|
||||
std::list<SMatch> searchAll(const std::string& s) const;
|
||||
int search(const std::string &s, SMatch *m) const;
|
||||
int search(const std::string &s, SMatch *match) const;
|
||||
int search(const std::string &s) const;
|
||||
|
||||
const std::string pattern;
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace utils {
|
||||
|
||||
|
||||
double cpu_seconds(void);
|
||||
std::string find_resource(const std::string& file, const std::string& param,
|
||||
std::string find_resource(const std::string& file, const std::string& config,
|
||||
std::string *err);
|
||||
std::string get_path(const std::string& file);
|
||||
std::list<std::string> expandEnv(const std::string& var, int flags);
|
||||
|
||||
Reference in New Issue
Block a user