diff options
author | Jose <jose@zeroc.com> | 2019-06-21 22:22:14 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-21 22:22:14 +0200 |
commit | d1b7c66fab777fe72e5cf77fd284218e2080b017 (patch) | |
tree | b48615b2d9d2f59195c8a560e07585b9cbb77cb5 /cpp/src/IceGrid/Activator.cpp | |
parent | Add ice_isFixed - Close #356 (diff) | |
download | ice-d1b7c66fab777fe72e5cf77fd284218e2080b017.tar.bz2 ice-d1b7c66fab777fe72e5cf77fd284218e2080b017.tar.xz ice-d1b7c66fab777fe72e5cf77fd284218e2080b017.zip |
Enable -Wconversion with clang - Close #363
Diffstat (limited to 'cpp/src/IceGrid/Activator.cpp')
-rw-r--r-- | cpp/src/IceGrid/Activator.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/IceGrid/Activator.cpp b/cpp/src/IceGrid/Activator.cpp index a1d8657d510..46832e71757 100644 --- a/cpp/src/IceGrid/Activator.cpp +++ b/cpp/src/IceGrid/Activator.cpp @@ -644,14 +644,14 @@ Activator::activate(const string& name, groups.resize(20); int ngroups = static_cast<int>(groups.size()); #if defined(__APPLE__) - if(getgrouplist(pw->pw_name, gid, reinterpret_cast<int*>(&groups[0]), &ngroups) < 0) + if(getgrouplist(pw->pw_name, static_cast<int>(gid), reinterpret_cast<int*>(&groups[0]), &ngroups) < 0) #else if(getgrouplist(pw->pw_name, gid, &groups[0], &ngroups) < 0) #endif { - groups.resize(ngroups); + groups.resize(static_cast<size_t>(ngroups)); #if defined(__APPLE__) - getgrouplist(pw->pw_name, gid, reinterpret_cast<int*>(&groups[0]), &ngroups); + getgrouplist(pw->pw_name, static_cast<int>(gid), reinterpret_cast<int*>(&groups[0]), &ngroups); #else getgrouplist(pw->pw_name, gid, &groups[0], &ngroups); #endif @@ -716,7 +716,7 @@ Activator::activate(const string& name, // // Don't initialize supplementary groups if we are not running as root. // - if(getuid() == 0 && setgroups(groups.size(), &groups[0]) == -1) + if(getuid() == 0 && setgroups(static_cast<int>(groups.size()), &groups[0]) == -1) { ostringstream os; os << pw->pw_name; @@ -811,7 +811,7 @@ Activator::activate(const string& name, string message; while((rs = read(errorFds[0], &s, 16)) > 0) { - message.append(s, rs); + message.append(s, static_cast<size_t>(rs)); } // @@ -1303,7 +1303,7 @@ Activator::terminationListener() // while((rs = read(fd, &s, 16)) > 0) { - message.append(s, rs); + message.append(s, static_cast<size_t>(rs)); } // |