summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/base64.cpp2
-rw-r--r--src/utils/mkdir.cpp2
-rw-r--r--src/utils/sha256.cpp2
-rw-r--r--src/utils/stringutils.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index c7f34a5d9..cdd928105 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -119,7 +119,7 @@ unsigned char *php3_base64_decode(const unsigned char *string,
chp = strchr(base64_table, ch);
if (!chp)
continue;
- ch = chp - base64_table;
+ ch = static_cast<int>(chp - base64_table);
switch(i % 4)
{
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index 26456ede2..e71bd4892 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -48,7 +48,7 @@ int mkdir_r(const char *pathname)
strncpy(tmp, pathname, sizeof(tmp) - 1);
tmp[PATH_MAX - 1] = '\0';
- int len = strlen(tmp);
+ int len = static_cast<int>(strlen(tmp));
// terminate the pathname with '/'
if (tmp[len - 1] != '/')
diff --git a/src/utils/sha256.cpp b/src/utils/sha256.cpp
index 80126479a..b38bbb7db 100644
--- a/src/utils/sha256.cpp
+++ b/src/utils/sha256.cpp
@@ -290,5 +290,5 @@ std::string SHA256Hash(const char *src, int len)
std::string sha256(const std::string &string)
{
- return SHA256Hash(string.c_str(), string.length());
+ return SHA256Hash(string.c_str(), static_cast<int>(string.length()));
}
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index b5c2abd3e..02bba8599 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -338,7 +338,7 @@ void replaceSpecialChars(std::string &text)
if (idx >= text.size())
break;
- unsigned f;
+ size_t f;
for (f = idx; f < text.size(); f ++)
{
if (text[f] < '0' || text[f] > '9')