mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Fix SonarCloud errors
This commit is contained in:
parent
6637569d03
commit
68161a4b4d
@ -71,9 +71,9 @@ using modsecurity::audit_log::AuditLog;
|
|||||||
/** @ingroup ModSecurity_CPP_API */
|
/** @ingroup ModSecurity_CPP_API */
|
||||||
class ConfigInt {
|
class ConfigInt {
|
||||||
public:
|
public:
|
||||||
ConfigInt() : m_set(false), m_value(0) { }
|
bool m_set = false;
|
||||||
bool m_set;
|
int m_value = 0;
|
||||||
int m_value;
|
ConfigInt() = default;
|
||||||
|
|
||||||
void merge(const ConfigInt *from) {
|
void merge(const ConfigInt *from) {
|
||||||
if (m_set == true || from->m_set == false) {
|
if (m_set == true || from->m_set == false) {
|
||||||
@ -87,9 +87,9 @@ class ConfigInt {
|
|||||||
|
|
||||||
class ConfigUnsignedInt {
|
class ConfigUnsignedInt {
|
||||||
public:
|
public:
|
||||||
ConfigUnsignedInt() : m_set(false), m_value(0) { }
|
bool m_set = false;
|
||||||
bool m_set;
|
unsigned int m_value = 0;
|
||||||
unsigned int m_value;
|
ConfigUnsignedInt() = default;
|
||||||
|
|
||||||
void merge(const ConfigUnsignedInt *from) {
|
void merge(const ConfigUnsignedInt *from) {
|
||||||
if (m_set == true || from->m_set == false) {
|
if (m_set == true || from->m_set == false) {
|
||||||
@ -104,9 +104,9 @@ class ConfigUnsignedInt {
|
|||||||
|
|
||||||
class ConfigDouble {
|
class ConfigDouble {
|
||||||
public:
|
public:
|
||||||
ConfigDouble() : m_set(false), m_value(0) { }
|
bool m_set = false;
|
||||||
bool m_set;
|
double m_value = 0.0;
|
||||||
double m_value;
|
ConfigDouble() = default;
|
||||||
|
|
||||||
void merge(const ConfigDouble *from) {
|
void merge(const ConfigDouble *from) {
|
||||||
if (m_set == true || from->m_set == false) {
|
if (m_set == true || from->m_set == false) {
|
||||||
@ -121,9 +121,9 @@ class ConfigDouble {
|
|||||||
|
|
||||||
class ConfigString {
|
class ConfigString {
|
||||||
public:
|
public:
|
||||||
ConfigString() : m_set(false), m_value("") { }
|
bool m_set = false;
|
||||||
bool m_set;
|
std::string m_value = "";
|
||||||
std::string m_value;
|
ConfigString() = default;
|
||||||
|
|
||||||
void merge(const ConfigString *from) {
|
void merge(const ConfigString *from) {
|
||||||
if (m_set == true || from->m_set == false) {
|
if (m_set == true || from->m_set == false) {
|
||||||
@ -138,10 +138,10 @@ class ConfigString {
|
|||||||
|
|
||||||
class ConfigSet {
|
class ConfigSet {
|
||||||
public:
|
public:
|
||||||
ConfigSet() : m_set(false), m_clear(false) { }
|
bool m_set = false;
|
||||||
bool m_set;
|
bool m_clear = false;
|
||||||
bool m_clear;
|
|
||||||
std::set<std::string> m_value;
|
std::set<std::string> m_value;
|
||||||
|
ConfigSet() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ inline std::string toupper(std::string str) { // cppcheck-suppress passedByValue
|
|||||||
}
|
}
|
||||||
|
|
||||||
inline int parse_unsigned_int(const std::string &a, unsigned int *res) {
|
inline int parse_unsigned_int(const std::string &a, unsigned int *res) {
|
||||||
char *endptr = NULL;
|
char *endptr = nullptr;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
|
||||||
unsigned long val = strtoul(a.c_str(), &endptr, 10);
|
unsigned long val = strtoul(a.c_str(), &endptr, 10);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user