From c242b2536401dc06ab5740d6c9c01013282ed795 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 16 Jul 2021 18:27:15 +0200 Subject: [PATCH] Work around compilation warning Clang 12 (at least) misses the fact that tag is always initialized, because the if/else sequence does cover all cases. Initialize the variable although it is not required. It does not hurt at least. --- src/mathed/InsetMathScript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mathed/InsetMathScript.cpp b/src/mathed/InsetMathScript.cpp index 9f391f66f9..a5f286b3a5 100644 --- a/src/mathed/InsetMathScript.cpp +++ b/src/mathed/InsetMathScript.cpp @@ -611,7 +611,7 @@ void InsetMathScript::mathmlize(MathMLStream & ms) const if (!d && !u) return; - const char * tag; + const char * tag = nullptr; if (u && d) tag = has_limits ? "munderover" : "msubsup"; else if (u) -- 2.39.5