mirror of
https://github.com/LibreOffice/online.git
synced 2025-08-20 23:24:34 +00:00
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
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user