Module: check_mk
Branch: master
Commit: a257b119b3a2795bdbbf0139eeab1072d0b9ecc3
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=a257b119b3a279…
Author: Sven Panne <sp(a)mathias-kettner.de>
Date: Fri Apr 26 13:25:10 2019 +0200
Activate shadowVar again.
Change-Id: Iaed56e320289d0e242134905f4ca8490e45ab434
---
livestatus/src/cppcheck-suppressions.txt | 1 -
livestatus/src/module.cc | 16 +++++++++-------
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/livestatus/src/cppcheck-suppressions.txt
b/livestatus/src/cppcheck-suppressions.txt
index 02ff896..073e164 100644
--- a/livestatus/src/cppcheck-suppressions.txt
+++ b/livestatus/src/cppcheck-suppressions.txt
@@ -6,7 +6,6 @@ noExplicitConstructor
passedByValue
preprocessorErrorDirective
redundantAssignment
-shadowVar
shiftTooManyBitsSigned
sizeofFunctionCall
uninitMemberVar
diff --git a/livestatus/src/module.cc b/livestatus/src/module.cc
index 88363bc..bde38d9 100644
--- a/livestatus/src/module.cc
+++ b/livestatus/src/module.cc
@@ -690,13 +690,15 @@ std::string check_path(const std::string &name, const
std::string &path) {
}
void livestatus_parse_arguments(Logger *logger, const char *args_orig) {
- // set default path to our logfile to be in the same path as nagios.log
- extern char *log_file;
- std::string lf{log_file};
- auto slash = lf.rfind('/');
- fl_paths._logfile =
- (slash == std::string::npos ? "/tmp/" : lf.substr(0, slash + 1)) +
- "livestatus.log";
+ {
+ // set default path to our logfile to be in the same path as nagios.log
+ extern char *log_file;
+ std::string lf{log_file};
+ auto slash = lf.rfind('/');
+ fl_paths._logfile =
+ (slash == std::string::npos ? "/tmp/" : lf.substr(0, slash + 1)) +
+ "livestatus.log";
+ }
if (args_orig == nullptr) {
return; // no arguments, use default options