Thread safety: Initializing var before exhaustive switch statement to deal with extraneous warning produced by gcc but not clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139611 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp
index 81725c7..8ea8a67 100644
--- a/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/lib/Sema/AnalysisBasedWarnings.cpp
@@ -667,7 +667,7 @@
 
   void handleMutexNotHeld(const NamedDecl *D, ProtectedOperationKind POK,
                           Name LockName, LockKind LK, SourceLocation Loc) {
-    unsigned DiagID;
+    unsigned DiagID = 0;
     switch (POK) {
       case POK_VarAccess:
         DiagID = diag::warn_variable_requires_lock;