[cfe-commits] r139611 - /cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
Caitlin Sadowski
supertri at google.com
Tue Sep 13 11:01:58 PDT 2011
Author: supertri
Date: Tue Sep 13 13:01:58 2011
New Revision: 139611
URL: http://llvm.org/viewvc/llvm-project?rev=139611&view=rev
Log:
Thread safety: Initializing var before exhaustive switch statement to deal with extraneous warning produced by gcc but not clang
Modified:
cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
Modified: cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp?rev=139611&r1=139610&r2=139611&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)
+++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Tue Sep 13 13:01:58 2011
@@ -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;
More information about the cfe-commits
mailing list