[Libreoffice-commits] online.git: common/Log.cpp
Tor Lillqvist
tml at collabora.com
Thu Jul 19 09:17:52 UTC 2018
common/Log.cpp | 4 ----
1 file changed, 4 deletions(-)
New commits:
commit eae43a262ba36bde802b5d0108757220dd38d50b
Author: Tor Lillqvist <tml at collabora.com>
Date: Thu Jul 19 12:08:26 2018 +0300
Drop unused LogPrefix variable
Also gets rid of a potentially problematic strncpy() use that causes a
gcc warning: specified bound 256 equals destination size
[-Werror=stringop-truncation].
(Whether that would have caused a problem or not depends on how
LogPrefix would have been used, and whether it ever would have been
filled completely, without any terminating nul character, by that
strncpy().)
Change-Id: I92dba3726e3f46777d9b4c8cf88f557c02788fe0
diff --git a/common/Log.cpp b/common/Log.cpp
index 4725b9024..a3140bd48 100644
--- a/common/Log.cpp
+++ b/common/Log.cpp
@@ -33,8 +33,6 @@
#include "Log.hpp"
#include "Util.hpp"
-static char LogPrefix[256] = { '\0' };
-
namespace Log
{
using namespace Poco;
@@ -140,8 +138,6 @@ namespace Log
oss << Source.name << '-'
<< std::setw(5) << std::setfill('0') << Poco::Process::id();
Source.id = oss.str();
- assert (sizeof (LogPrefix) > strlen(oss.str().c_str()) + 1);
- strncpy(LogPrefix, oss.str().c_str(), sizeof(LogPrefix));
// Configure the logger.
AutoPtr<Channel> channel;
More information about the Libreoffice-commits
mailing list