summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/Util.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2019-06-21 22:22:14 +0200
committerJose <jose@zeroc.com>2019-06-21 22:22:14 +0200
commitd1b7c66fab777fe72e5cf77fd284218e2080b017 (patch)
treeb48615b2d9d2f59195c8a560e07585b9cbb77cb5 /cpp/src/IceSSL/Util.cpp
parentAdd ice_isFixed - Close #356 (diff)
downloadice-d1b7c66fab777fe72e5cf77fd284218e2080b017.tar.bz2
ice-d1b7c66fab777fe72e5cf77fd284218e2080b017.tar.xz
ice-d1b7c66fab777fe72e5cf77fd284218e2080b017.zip
Enable -Wconversion with clang - Close #363
Diffstat (limited to 'cpp/src/IceSSL/Util.cpp')
-rwxr-xr-xcpp/src/IceSSL/Util.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp
index 0d04ab423cd..e5832d8487a 100755
--- a/cpp/src/IceSSL/Util.cpp
+++ b/cpp/src/IceSSL/Util.cpp
@@ -36,8 +36,8 @@ IceSSL::fromCFString(CFStringRef v)
{
CFIndex size = CFStringGetMaximumSizeForEncoding(CFStringGetLength(v), kCFStringEncodingUTF8);
vector<char> buffer;
- buffer.resize(size + 1);
- CFStringGetCString(v, &buffer[0], buffer.size(), kCFStringEncodingUTF8);
+ buffer.resize(static_cast<size_t>(size + 1));
+ CFStringGetCString(v, &buffer[0], static_cast<CFIndex>(buffer.size()), kCFStringEncodingUTF8);
s.assign(&buffer[0]);
}
return s;
@@ -118,12 +118,12 @@ IceSSL::readFile(const string& file, vector<char>& buffer)
}
is.seekg(0, is.end);
- buffer.resize(static_cast<int>(is.tellg()));
+ buffer.resize(static_cast<size_t>(is.tellg()));
is.seekg(0, is.beg);
if(!buffer.empty())
{
- is.read(&buffer[0], buffer.size());
+ is.read(&buffer[0], static_cast<streamsize>(buffer.size()));
if(!is.good())
{
throw CertificateReadException(__FILE__, __LINE__, "error reading file " + file);