From b1668bce816286ddd445f67acac59f6ffab7475e Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Wed, 8 Jan 2014 06:38:49 -0800 Subject: [PATCH] EDS: fix false clang warning Control flow analysis from clang's own C++ compiler and clang's scan-tool come to different results: the compiler fails to detect that the variable will be initialized in all cases and thus requires a redundant initialization to avoid an "uninitialized memory read" error with -Wall, while scan-tool complains about the redundant write. To satisfy both, avoid the initialization when doing static code analysis. --- src/backends/evolution/EvolutionContactSource.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/backends/evolution/EvolutionContactSource.cpp b/src/backends/evolution/EvolutionContactSource.cpp index 590ff9b1..60ff94c5 100644 --- a/src/backends/evolution/EvolutionContactSource.cpp +++ b/src/backends/evolution/EvolutionContactSource.cpp @@ -564,9 +564,17 @@ void EvolutionContactSource::invalidateCachedContact(boost::shared_ptr