From 805c07c3bb33cae573d90d748ffc5dc9d396f2cd Mon Sep 17 00:00:00 2001 From: Andy Schwerin Date: Tue, 3 Sep 2013 18:51:41 -0400 Subject: 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. --- src/mongo/db/auth/authorization_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1