summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@10gen.com>2013-09-03 18:51:41 -0400
committerAndy Schwerin <schwerin@10gen.com>2013-09-03 18:51:41 -0400
commit805c07c3bb33cae573d90d748ffc5dc9d396f2cd (patch)
treeb590d83be0e53fdec8681df8ca00029e48338e7d
parent5fb2c2c35426d907057bccf6ffefec0493897af6 (diff)
downloadmongo-805c07c3bb33cae573d90d748ffc5dc9d396f2cd.tar.gz
SERVER-9516 Initialize local variable to satisfy a compiler.
Newer compilers correctly identify that durableVersion in this patch is always initialized before use, but some older compilers cannot perform a sufficient analysis, and issue a spurious warning.
-rw-r--r--src/mongo/db/auth/authorization_manager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/auth/authorization_manager.cpp b/src/mongo/db/auth/authorization_manager.cpp
index 8a01809da4f..d286811d7d7 100644
--- a/src/mongo/db/auth/authorization_manager.cpp
+++ b/src/mongo/db/auth/authorization_manager.cpp
@@ -704,7 +704,7 @@ namespace {
if (!lkUpgrade.tryLock()) {
return Status(ErrorCodes::LockBusy, "Could not lock auth data upgrade process lock.");
}
- int durableVersion;
+ int durableVersion = 0;
Status status = readAuthzVersion(_externalState.get(), &durableVersion);
if (!status.isOK())
return status;