Skip to content

Commit 495b47d

Browse files
majordawFelipe Zimmerle
authored andcommitted
Eliminate some reorder and sign warnings
1 parent 4909713 commit 495b47d

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

headers/modsecurity/actions/action.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ namespace actions {
3939
class Action {
4040
public:
4141
explicit Action(const std::string& _action)
42-
: action_kind(2),
43-
m_isNone(false),
42+
: m_isNone(false),
43+
temporaryAction(false),
44+
action_kind(2),
4445
m_name(""),
45-
m_referenceCount(1),
4646
m_parser_payload(""),
47-
temporaryAction(false) {
47+
m_referenceCount(1) {
4848
set_name_and_payload(_action);
4949
}
5050
explicit Action(const std::string& _action, int kind)
51-
: action_kind(kind),
52-
m_isNone(false),
51+
: m_isNone(false),
52+
temporaryAction(false),
53+
action_kind(kind),
5354
m_name(""),
54-
m_referenceCount(1),
5555
m_parser_payload(""),
56-
temporaryAction(false) {
56+
m_referenceCount(1) {
5757
set_name_and_payload(_action);
5858
}
5959

headers/modsecurity/rules.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,19 @@ class Rules : public RulesProperties {
4545
public:
4646
Rules()
4747
: RulesProperties(new DebugLog()),
48+
unicode_codepage(0),
4849
m_referenceCount(0),
49-
m_secmarker_skipped(0),
50-
unicode_codepage(0) {
50+
m_secmarker_skipped(0) {
5151
unicode_map_table = reinterpret_cast<int *>(
5252
malloc(sizeof(int)*65536));
5353
memset(unicode_map_table, -1, (sizeof(int)*65536));
5454
}
5555

5656
explicit Rules(DebugLog *customLog)
57-
: m_referenceCount(0),
58-
m_secmarker_skipped(0),
57+
: RulesProperties(customLog),
5958
unicode_codepage(0),
60-
RulesProperties(customLog) {
59+
m_referenceCount(0),
60+
m_secmarker_skipped(0) {
6161
unicode_map_table = reinterpret_cast<int *>(
6262
malloc(sizeof(int)*65536));
6363
memset(unicode_map_table, -1, (sizeof(int)*65536));

headers/modsecurity/rules_properties.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -82,31 +82,31 @@ class ConfigSet {
8282
class RulesProperties {
8383
public:
8484
RulesProperties() :
85-
m_debugLog(new DebugLog()),
8685
m_auditLog(new AuditLog()),
87-
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
86+
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
87+
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
8888
m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
8989
m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
9090
m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
91-
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
92-
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
93-
m_secRuleEngine(PropertyNotSetRuleEngine),
91+
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
9492
m_uploadKeepFiles(PropertyNotSetConfigBoolean),
95-
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean) { }
93+
m_debugLog(new DebugLog()),
94+
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
95+
m_secRuleEngine(PropertyNotSetRuleEngine) { }
9696

9797

9898
explicit RulesProperties(DebugLog *debugLog) :
99-
m_debugLog(debugLog),
10099
m_auditLog(new AuditLog()),
101-
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
100+
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
101+
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
102102
m_secRequestBodyAccess(PropertyNotSetConfigBoolean),
103103
m_secResponseBodyAccess(PropertyNotSetConfigBoolean),
104104
m_secXMLExternalEntity(PropertyNotSetConfigBoolean),
105-
m_requestBodyLimitAction(PropertyNotSetBodyLimitAction),
106-
m_responseBodyLimitAction(PropertyNotSetBodyLimitAction),
107-
m_secRuleEngine(PropertyNotSetRuleEngine),
105+
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean),
108106
m_uploadKeepFiles(PropertyNotSetConfigBoolean),
109-
m_tmpSaveUploadedFiles(PropertyNotSetConfigBoolean) { }
107+
m_debugLog(debugLog),
108+
m_remoteRulesActionOnFailed(PropertyNotSetRemoteRulesAction),
109+
m_secRuleEngine(PropertyNotSetRuleEngine) { }
110110

111111

112112
~RulesProperties() {
@@ -360,7 +360,7 @@ class RulesProperties {
360360
std::vector<actions::Action *> *actions_from = \
361361
from->m_defaultActions+i;
362362
std::vector<actions::Action *> *actions_to = to->m_defaultActions+i;
363-
for (int j = 0; j < actions_from->size(); j++) {
363+
for (size_t j = 0; j < actions_from->size(); j++) {
364364
actions::Action *action = actions_from->at(j);
365365
action->refCountIncrease();
366366
actions_to->push_back(action);
@@ -411,9 +411,9 @@ class RulesProperties {
411411
for (int i = 0; i < modsecurity::Phases::NUMBER_OF_PHASES; i++) {
412412
std::vector<modsecurity::Rule *> *rules_to = to+i;
413413
std::vector<modsecurity::Rule *> *rules_from = from+i;
414-
for (int j = 0; j < rules_from->size(); j++) {
414+
for (size_t j = 0; j < rules_from->size(); j++) {
415415
Rule *rule = rules_from->at(j);
416-
for (int z = 0; z < rules_to->size(); z++) {
416+
for (size_t z = 0; z < rules_to->size(); z++) {
417417
Rule *rule_ckc = rules_to->at(z);
418418
if (rule_ckc->m_ruleId == rule->m_ruleId &&
419419
rule_ckc->m_secMarker == false &&

headers/modsecurity/transaction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ class TransactionAnchoredVariables {
127127
m_variableRemotePort(t, "REMOTE_PORT"),
128128
m_variableReqbodyError(t, "REQBODY_ERROR"),
129129
m_variableReqbodyErrorMsg(t, "REQBODY_ERROR_MSG"),
130-
m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"),
131130
m_variableReqbodyProcessorError(t, "REQBODY_PROCESSOR_ERROR"),
131+
m_variableReqbodyProcessorErrorMsg(t, "REQBODY_PROCESSOR_ERROR_MSG"),
132132
m_variableReqbodyProcessor(t, "REQBODY_PROCESSOR"),
133133
m_variableRequestBasename(t, "REQUEST_BASENAME"),
134134
m_variableRequestBody(t, "REQUEST_BODY"),

0 commit comments

Comments
 (0)