mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 21:36:00 +03:00
Cosmetics: address cppcheck warnings on src/utils
This commit is contained in:
parent
ff590174da
commit
ff9152ed74
@ -152,9 +152,9 @@ void Base64::decode_forgiven_engine(unsigned char *plain_text,
|
|||||||
ch = b64_reverse_t[ch];
|
ch = b64_reverse_t[ch];
|
||||||
if (ch < 0) {
|
if (ch < 0) {
|
||||||
continue;
|
continue;
|
||||||
} else if (ch == -2) {
|
/*} else if (ch == -2) {
|
||||||
*aiming_size = 0;
|
*aiming_size = 0;
|
||||||
return;
|
return;*/
|
||||||
}
|
}
|
||||||
switch (i % 4) {
|
switch (i % 4) {
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -54,10 +54,11 @@ class GeoLookup {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
GeoLookup() :
|
GeoLookup() :
|
||||||
|
m_version(NOT_LOADED)
|
||||||
#if WITH_GEOIP
|
#if WITH_GEOIP
|
||||||
m_gi(NULL),
|
,m_gi(NULL)
|
||||||
#endif
|
#endif
|
||||||
m_version(NOT_LOADED) { }
|
{ }
|
||||||
~GeoLookup();
|
~GeoLookup();
|
||||||
GeoLookup(GeoLookup const&);
|
GeoLookup(GeoLookup const&);
|
||||||
void operator=(GeoLookup const&);
|
void operator=(GeoLookup const&);
|
||||||
|
@ -75,12 +75,13 @@ class SharedFiles {
|
|||||||
private:
|
private:
|
||||||
SharedFiles()
|
SharedFiles()
|
||||||
#ifdef MODSEC_USE_GENERAL_LOCK
|
#ifdef MODSEC_USE_GENERAL_LOCK
|
||||||
: m_generalLock(NULL)
|
: m_generalLock(NULL),
|
||||||
|
m_memKeyStructure(0)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef MODSEC_USE_GENERAL_LOCK
|
#ifdef MODSEC_USE_GENERAL_LOCK
|
||||||
int shm_id;
|
int shm_id;
|
||||||
bool toBeCreated = true;
|
bool toBeCreated;
|
||||||
bool err = false;
|
bool err = false;
|
||||||
|
|
||||||
m_memKeyStructure = ftok(".", 1);
|
m_memKeyStructure = ftok(".", 1);
|
||||||
@ -122,7 +123,6 @@ err_shmget1:
|
|||||||
err_shmat1:
|
err_shmat1:
|
||||||
std::cerr << "err_shmat1" << std::endl;
|
std::cerr << "err_shmat1" << std::endl;
|
||||||
}
|
}
|
||||||
toBeCreated = false;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
~SharedFiles() {
|
~SharedFiles() {
|
||||||
|
@ -71,3 +71,7 @@ functionStatic:headers/modsecurity/transaction.h:374
|
|||||||
|
|
||||||
functionStatic:src/operators/geo_lookup.h:35
|
functionStatic:src/operators/geo_lookup.h:35
|
||||||
useInitializationList:src/operators/rbl.h:69
|
useInitializationList:src/operators/rbl.h:69
|
||||||
|
|
||||||
|
unmatchedSuppression:src/utils/geo_lookup.cc:82
|
||||||
|
useInitializationList:src/utils/shared_files.h:87
|
||||||
|
unmatchedSuppression:src/utils/msc_tree.cc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user