Cosmetics: address cppcheck warnings on src/utils

This commit is contained in:
Felipe Zimmerle 2020-01-23 08:51:45 -03:00
parent ff590174da
commit ff9152ed74
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
4 changed files with 12 additions and 7 deletions

View File

@ -152,9 +152,9 @@ void Base64::decode_forgiven_engine(unsigned char *plain_text,
ch = b64_reverse_t[ch];
if (ch < 0) {
continue;
} else if (ch == -2) {
/*} else if (ch == -2) {
*aiming_size = 0;
return;
return;*/
}
switch (i % 4) {
case 0:

View File

@ -54,10 +54,11 @@ class GeoLookup {
private:
GeoLookup() :
m_version(NOT_LOADED)
#if WITH_GEOIP
m_gi(NULL),
,m_gi(NULL)
#endif
m_version(NOT_LOADED) { }
{ }
~GeoLookup();
GeoLookup(GeoLookup const&);
void operator=(GeoLookup const&);

View File

@ -75,12 +75,13 @@ class SharedFiles {
private:
SharedFiles()
#ifdef MODSEC_USE_GENERAL_LOCK
: m_generalLock(NULL)
: m_generalLock(NULL),
m_memKeyStructure(0)
#endif
{
#ifdef MODSEC_USE_GENERAL_LOCK
int shm_id;
bool toBeCreated = true;
bool toBeCreated;
bool err = false;
m_memKeyStructure = ftok(".", 1);
@ -122,7 +123,6 @@ err_shmget1:
err_shmat1:
std::cerr << "err_shmat1" << std::endl;
}
toBeCreated = false;
#endif
}
~SharedFiles() {

View File

@ -71,3 +71,7 @@ functionStatic:headers/modsecurity/transaction.h:374
functionStatic:src/operators/geo_lookup.h:35
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