[Libreoffice-commits] online.git: common/Util.cpp tools/Config.cpp wsd/FileServer.cpp
Miklos Vajna
vmiklos at collabora.co.uk
Mon Nov 6 08:14:56 UTC 2017
common/Util.cpp | 2 +-
tools/Config.cpp | 2 +-
wsd/FileServer.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit bb7ac21d4438a6aaf6b7423d547e9e48918369c8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Nov 6 09:14:30 2017 +0100
Make sure that loop index type is never narrower than the length type
Change-Id: I19aac80850c0371085ca6364412d5ac9207220d0
diff --git a/common/Util.cpp b/common/Util.cpp
index 9dd3c80c..51c15b74 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -124,7 +124,7 @@ namespace Util
data.clear();
std::stringstream stream;
unsigned value;
- for (unsigned offset = 0; offset < hexString.size(); offset += 2)
+ for (unsigned long offset = 0; offset < hexString.size(); offset += 2)
{
stream.clear();
stream << std::hex << hexString.substr(offset, 2);
diff --git a/tools/Config.cpp b/tools/Config.cpp
index 143cde02..c8e7c717 100644
--- a/tools/Config.cpp
+++ b/tools/Config.cpp
@@ -187,7 +187,7 @@ int Config::main(const std::vector<std::string>& args)
bool changed = false;
_loolConfig.load(ConfigFile);
- for (unsigned i = 0; i < args.size(); i++)
+ for (unsigned long i = 0; i < args.size(); i++)
{
if (args[i] == "set-admin-password")
{
diff --git a/wsd/FileServer.cpp b/wsd/FileServer.cpp
index 949ad0f1..3cba4961 100644
--- a/wsd/FileServer.cpp
+++ b/wsd/FileServer.cpp
@@ -111,7 +111,7 @@ bool FileServerRequestHandler::isAdminLoggedIn(const HTTPRequest& request,
sizeof userProvidedPwdHash, userProvidedPwdHash);
std::stringstream stream;
- for (unsigned j = 0; j < sizeof userProvidedPwdHash; ++j)
+ for (unsigned long j = 0; j < sizeof userProvidedPwdHash; ++j)
stream << std::hex << std::setw(2) << std::setfill('0') << static_cast<int>(userProvidedPwdHash[j]);
userProvidedPwd = stream.str();
More information about the Libreoffice-commits
mailing list