[cfe-commits] r135351 - /cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp

Benjamin Kramer benny.kra at googlemail.com
Sat Jul 16 13:13:06 PDT 2011


Author: d0k
Date: Sat Jul 16 15:13:06 2011
New Revision: 135351

URL: http://llvm.org/viewvc/llvm-project?rev=135351&view=rev
Log:
Zero this struct in a way that neither depends on the size of the struct nor triggers warnings from GCC.

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=135351&r1=135350&r2=135351&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp (original)
+++ cfe/trunk/lib/Sema/AnalysisBasedWarnings.cpp Sat Jul 16 15:13:06 2011
@@ -724,6 +724,7 @@
     if (CFG *cfg = AC.getCFG()) {
       UninitValsDiagReporter reporter(S);
       UninitVariablesAnalysisStats stats;
+      std::memset(&stats, 0, sizeof(UninitVariablesAnalysisStats));
       runUninitializedVariablesAnalysis(*cast<DeclContext>(D), *cfg, AC,
                                         reporter, stats);
 





More information about the cfe-commits mailing list