diff options
author | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
commit | c5959fd09de61604bedd75354401df6a57395d65 (patch) | |
tree | 3b0227f631c8b20fb1a1a274b92f63f52f34af2c /cpp/src/IceGrid/ServerI.cpp | |
parent | Small fix (diff) | |
parent | Enable -Wconversion with clang - Close #363 (diff) | |
download | ice-c5959fd09de61604bedd75354401df6a57395d65.tar.bz2 ice-c5959fd09de61604bedd75354401df6a57395d65.tar.xz ice-c5959fd09de61604bedd75354401df6a57395d65.zip |
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/src/IceGrid/ServerI.cpp')
-rw-r--r-- | cpp/src/IceGrid/ServerI.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/IceGrid/ServerI.cpp b/cpp/src/IceGrid/ServerI.cpp index 62401c15c63..ca9c6d24121 100644 --- a/cpp/src/IceGrid/ServerI.cpp +++ b/cpp/src/IceGrid/ServerI.cpp @@ -2599,12 +2599,12 @@ ServerI::checkAndUpdateUser(const InternalServerDescriptorPtr& desc, bool /*upda // Get the uid/gid associated with the given user. // struct passwd pwbuf; - int sz = sysconf(_SC_GETPW_R_SIZE_MAX); + long sz = sysconf(_SC_GETPW_R_SIZE_MAX); if(sz == -1) { sz = 4096; } - vector<char> buffer(sz); + vector<char> buffer(static_cast<size_t>(sz)); struct passwd *pw; int err = getpwnam_r(user.c_str(), &pwbuf, &buffer[0], buffer.size(), &pw); while(err == ERANGE && buffer.size() < 1024 * 1024) // Limit buffer to 1MB |