summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTad Marshall <tad@10gen.com>2013-03-13 12:52:49 -0400
committerTad Marshall <tad@10gen.com>2013-03-13 14:54:58 -0400
commitfd5c1b3925f09937855e8a19130853281acecabb (patch)
tree0610be94f3a3a157e3c8e628c4047a4d0b77c125
parent1039ebd0cb0fec11a60260a2257bd2e74604fbf6 (diff)
downloadmongo-fd5c1b3925f09937855e8a19130853281acecabb.tar.gz
SERVER-5099 Fix 32-bit signed/unsigned warnings
-rw-r--r--src/mongo/util/text.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/text.cpp b/src/mongo/util/text.cpp
index 2144df0cda8..c1e53307d6f 100644
--- a/src/mongo/util/text.cpp
+++ b/src/mongo/util/text.cpp
@@ -307,14 +307,14 @@ namespace mongo {
vector<size_t> utf8envLength;
blockSize = (envCount + 1) * sizeof(char*);
blockPtr = blockSize;
- for (int i = 0; i < envCount; ++i) {
+ for (size_t i = 0; i < envCount; ++i) {
utf8envs.push_back( toUtf8String(envpW[i]) );
size_t envLength = utf8envs[i].length() + 1;
utf8envLength.push_back(envLength);
blockSize += envLength;
}
_envp = static_cast<char**>(malloc(blockSize));
- int i;
+ size_t i;
for (i = 0; i < envCount; ++i) {
_envp[i] = reinterpret_cast<char*>(_envp) + blockPtr;
strcpy_s(_envp[i], utf8envLength[i], utf8envs[i].c_str());