From 605af0c461c26d19611ae7e456b6baddf91c6bc1 Mon Sep 17 00:00:00 2001 From: ymuv Date: Mon, 23 Jan 2017 01:10:59 +0200 Subject: Fix -Wsign-compare and control reaches end of non-void function --- src/tools/StringTools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/StringTools.cpp b/src/tools/StringTools.cpp index a48b4eb..ab7da46 100644 --- a/src/tools/StringTools.cpp +++ b/src/tools/StringTools.cpp @@ -80,7 +80,7 @@ string generateRandomString(size_t length) { static const string chars("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-=[]\\;',./!@#$%^&*()_+{}|:\"<>?`~"); static const size_t charsLen = chars.length(); string result; - for (int i = 0; i < length; ++i) { + for (size_t i = 0; i < length; ++i) { result += chars[rand() % charsLen]; } return result; -- cgit v1.2.3