aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2015-08-20 15:42:51 +0200
committerjackpoz <giacomopoz@gmail.com>2015-08-20 15:42:51 +0200
commit51a2a3fa93702f289cda1e64323f55aba02f1026 (patch)
treec4211dedbdae8754dcf200aaea60a0a3d0450bc4
parent30fc4f9f63b7a0ce01e5aad4667902991b70e298 (diff)
Core/Misc: Fix issues reported by static analysis
Coverity defect IDs: 1316687, 1316688
-rw-r--r--src/common/Logging/AppenderFile.cpp2
-rw-r--r--src/common/Logging/Log.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/common/Logging/AppenderFile.cpp b/src/common/Logging/AppenderFile.cpp
index d33818626fe..c90c8f6ccea 100644
--- a/src/common/Logging/AppenderFile.cpp
+++ b/src/common/Logging/AppenderFile.cpp
@@ -50,6 +50,8 @@ AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, Ap
if (extraArgs.size() > 2)
_maxFileSize = atoi(extraArgs[2]);
+ else
+ _maxFileSize = 0;
_dynamicName = std::string::npos != _fileName.find("%s");
_backup = (flags & APPENDER_FLAGS_MAKE_FILE_BACKUP) != 0;
diff --git a/src/common/Logging/Log.cpp b/src/common/Logging/Log.cpp
index 93b7b9d122e..57d399a9d96 100644
--- a/src/common/Logging/Log.cpp
+++ b/src/common/Logging/Log.cpp
@@ -27,7 +27,7 @@
#include <cstdio>
#include <sstream>
-Log::Log() : _ioService(nullptr), _strand(nullptr)
+Log::Log() : AppenderId(0), lowestLogLevel(LOG_LEVEL_FATAL), _ioService(nullptr), _strand(nullptr)
{
m_logsTimestamp = "_" + GetTimestampStr();
RegisterAppender<AppenderConsole>();