[Libreoffice-commits] online.git: common/Png.hpp tools/Stress.cpp wsd/Admin.cpp
Noel Grandin
noel.grandin at collabora.co.uk
Tue Dec 27 10:15:56 UTC 2016
common/Png.hpp | 2 +-
tools/Stress.cpp | 2 +-
wsd/Admin.cpp | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 0caeab803b911080ddbdc0ee15502e4be074fc5a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Dec 23 08:03:08 2016 +0200
loplugin:loopvartoosmall
Change-Id: I32f75fac7626b9ae56fa3f898bfa50051a22677f
Reviewed-on: https://gerrit.libreoffice.org/32362
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/common/Png.hpp b/common/Png.hpp
index 2596300..f859408 100644
--- a/common/Png.hpp
+++ b/common/Png.hpp
@@ -175,7 +175,7 @@ uint64_t hashSubBuffer(unsigned char* pixmap, size_t startX, size_t startY,
// assume a consistent mode - RGBA vs. BGRA for process
SpookyHash hash;
hash.Init(1073741789, 1073741789); // Seeds can be anything.
- for (int y = 0; y < height; ++y)
+ for (long y = 0; y < height; ++y)
{
const size_t position = ((startY + y) * bufferWidth * 4) + (startX * 4);
hash.Update(pixmap + position, width * 4);
diff --git a/tools/Stress.cpp b/tools/Stress.cpp
index 6bd768e..15c2a21 100644
--- a/tools/Stress.cpp
+++ b/tools/Stress.cpp
@@ -489,7 +489,7 @@ int Stress::main(const std::vector<std::string>& args)
std::vector<std::shared_ptr<Worker>> workers;
unsigned index = 0;
- for (unsigned i = 0; i < args.size(); ++i)
+ for (size_t i = 0; i < args.size(); ++i)
{
std::cout << "Arg: " << args[i] << std::endl;
for (unsigned j = 0; j < _numClients; ++j, ++index)
diff --git a/wsd/Admin.cpp b/wsd/Admin.cpp
index 73b23f7..7a38723 100644
--- a/wsd/Admin.cpp
+++ b/wsd/Admin.cpp
@@ -154,7 +154,7 @@ bool AdminRequestHandler::adminCommandHandler(const std::vector<char>& payload)
}
else if (tokens[0] == "set" && tokens.count() > 1)
{
- for (unsigned i = 1; i < tokens.count(); i++)
+ for (size_t i = 1; i < tokens.count(); i++)
{
StringTokenizer setting(tokens[i], "=", StringTokenizer::TOK_IGNORE_EMPTY | StringTokenizer::TOK_TRIM);
unsigned settingVal = 0;
More information about the Libreoffice-commits
mailing list