From: Jean-Marc Lasgouttes Date: Fri, 16 Jul 2021 16:27:15 +0000 (+0200) Subject: Work around compilation warning X-Git-Tag: 2.4-beta2~1133 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=c242b2536401dc06ab5740d6c9c01013282ed795;p=lyx.git 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. --- 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)