[Libreoffice-commits] core.git: compilerplugins/clang

Stephan Bergmann sbergman at redhat.com
Mon Mar 2 08:48:18 PST 2015


 compilerplugins/clang/literaltoboolconversion.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 88a031e593e0a16881132b08d162ed40a5549d23
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Mar 2 17:46:45 2015 +0100

    Missing initialization
    
    Change-Id: I45eabbe9d1a4e3f85f16c2869c4031fc06f5ef31

diff --git a/compilerplugins/clang/literaltoboolconversion.cxx b/compilerplugins/clang/literaltoboolconversion.cxx
index caae89b..65fe53c 100644
--- a/compilerplugins/clang/literaltoboolconversion.cxx
+++ b/compilerplugins/clang/literaltoboolconversion.cxx
@@ -43,7 +43,7 @@ bool LiteralToBoolConversion::VisitImplicitCastExpr(
         return true;
     }
     Expr const * sub = expr->getSubExpr()->IgnoreParenCasts();
-    Expr const * expr2;
+    Expr const * expr2 = expr;
     for (;;) {
         BinaryOperator const * op = dyn_cast<BinaryOperator>(sub);
         if (op == nullptr || op->getOpcode() != BO_Comma) {


More information about the Libreoffice-commits mailing list