mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Eliminate some reorder and sign warnings
This commit is contained in:
parent
4909713991
commit
495b47d8a2
@ -39,21 +39,21 @@ namespace actions {
|
||||
class Action {
|
||||
public:
|
||||
explicit Action(const std::string& _action)
|
||||
: action_kind(2),
|
||||
m_isNone(false),
|
||||
: m_isNone(false),
|
||||
temporaryAction(false),
|
||||
action_kind(2),
|
||||
m_name(""),
|
||||
m_referenceCount(1),
|
||||
m_parser_payload(""),
|
||||
temporaryAction(false) {
|
||||
m_referenceCount(1) {
|
||||
set_name_and_payload(_action);
|
||||
}
|
||||
explicit Action(const std::string& _action, int kind)
|
||||
: action_kind(kind),
|
||||
m_isNone(false),
|
||||
: m_isNone(false),
|
||||
temporaryAction(false),
|
||||
action_kind(kind),
|
||||
m_name(""),
|
||||
m_referenceCount(1),
|
||||
m_parser_payload(""),
|
||||
temporaryAction(false) {
|
||||
m_referenceCount(1) {
|
||||
set_name_and_payload(_action);
|
||||
}
|
||||
|
||||
|
@ -45,19 +45,19 @@ class Rules : public RulesProperties {
|
||||
public:
|
||||
Rules()
|
||||
: RulesProperties(new DebugLog()),
|
||||
unicode_codepage(0),
|
||||
m_referenceCount(0),
|
||||
m_secmarker_skipped(0),
|
||||
unicode_codepage(0) {
|
||||
m_secmarker_skipped(0) {
|
||||
unicode_map_table = reinterpret_cast<int *>(
|
||||
malloc(sizeof(int)*65536));
|
||||
memset(unicode_map_table, -1, (sizeof(int)*65536));
|
||||
}
|
||||
|
||||
explicit Rules(DebugLog *customLog)
|
||||
: m_referenceCount(0),
|
||||
m_secmarker_skipped(0),
|
||||
: RulesProperties(customLog),
|
||||
unicode_codepage(0),
|
||||
RulesProperties(customLog) {
|
||||
m_referenceCount(0),
|
||||
m_secmarker_skipped(0) {
|
||||
unicode_map_table = reinterpret_cast<int *>(
|
||||
malloc(sizeof(int)*65536));
|
||||
memset(unicode_map_table, -1, (sizeof(int)*65536));
|
||||
|
@ -82,31 +82,31 @@ class ConfigSet {
|
||||
class RulesProperties {
|
||||
public:
|
||||
RulesProperties() :
|
||||
m_debugLog(new DebugLog()),
|
||||
m_auditLog(new AuditLog()),
|
||||
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
|
||||
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
|
||||
m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
|
||||
m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
|
||||
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_secRuleEngine(PropertyNotSetRuleEngine),
|
||||
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
|
||||
m_uploadKeepFiles(PropertyNotSetConfigBoolean),
|
||||
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean) { }
|
||||
m_debugLog(new DebugLog()),
|
||||
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
|
||||
m_secRuleEngine(PropertyNotSetRuleEngine) { }
|
||||
|
||||
|
||||
explicit RulesProperties(DebugLog *debugLog) :
|
||||
m_debugLog(debugLog),
|
||||
m_auditLog(new AuditLog()),
|
||||
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
|
||||
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
|
||||
m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
|
||||
m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
|
||||
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
|
||||
m_secRuleEngine(PropertyNotSetRuleEngine),
|
||||
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
|
||||
m_uploadKeepFiles(PropertyNotSetConfigBoolean),
|
||||
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean) { }
|
||||
m_debugLog(debugLog),
|
||||
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
|
||||
m_secRuleEngine(PropertyNotSetRuleEngine) { }
|
||||
|
||||
|
||||
~RulesProperties() {
|
||||
@ -360,7 +360,7 @@ class RulesProperties {
|
||||
std::vector<actions::Action *> *actions_from = \
|
||||
from->m_defaultActions+i;
|
||||
std::vector<actions::Action *> *actions_to = to->m_defaultActions+i;
|
||||
for (int j = 0; j < actions_from->size(); j++) {
|
||||
for (size_t j = 0; j < actions_from->size(); j++) {
|
||||
actions::Action *action = actions_from->at(j);
|
||||
action->refCountIncrease();
|
||||
actions_to->push_back(action);
|
||||
@ -411,9 +411,9 @@ class RulesProperties {
|
||||
for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
|
||||
std::vector<modsecurity::Rule *> *rules_to = to+i;
|
||||
std::vector<modsecurity::Rule *> *rules_from = from+i;
|
||||
for (int j = 0; j < rules_from->size(); j++) {
|
||||
for (size_t j = 0; j < rules_from->size(); j++) {
|
||||
Rule *rule = rules_from->at(j);
|
||||
for (int z = 0; z < rules_to->size(); z++) {
|
||||
for (size_t z = 0; z < rules_to->size(); z++) {
|
||||
Rule *rule_ckc = rules_to->at(z);
|
||||
if (rule_ckc->m_ruleId == rule->m_ruleId &&
|
||||
rule_ckc->m_secMarker == false &&
|
||||
|
@ -127,8 +127,8 @@ class TransactionAnchoredVariables {
|
||||
m_variableRemotePort(t, "REMOTE_PORT"),
|
||||
m_variableReqbodyError(t, "REQBODY_ERROR"),
|
||||
m_variableReqbodyErrorMsg(t, "REQBODY_ERROR_MSG"),
|
||||
m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"),
|
||||
m_variableReqbodyProcessorError(t, "REQBODY_PROCESSOR_ERROR"),
|
||||
m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"),
|
||||
m_variableReqbodyProcessor(t, "REQBODY_PROCESSOR"),
|
||||
m_variableRequestBasename(t, "REQUEST_BASENAME"),
|
||||
m_variableRequestBody(t, "REQUEST_BODY"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user