From: Jean-Marc Lasgouttes Date: Wed, 8 Mar 2017 15:50:03 +0000 (+0100) Subject: Make a false positive explicit X-Git-Tag: 2.3.0alpha1~260 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=000dcb8672b68a6366ee48ce88c3adb57adecfd1;p=features.git Make a false positive explicit Pleases coverity --- diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp index 9d218987d3..8ff9461452 100644 --- a/src/mathed/MathData.cpp +++ b/src/mathed/MathData.cpp @@ -825,7 +825,10 @@ void MathData::collectParameters(Cursor * cur, } // put cursor in argument again - if (thisSlice != - 1 && thisPos == int(pos)) { + // Note: The first two expressions on the first line are + // equivalent (see caller), but making this explicit pleases + // coverity. + if (cur && thisSlice != -1 && thisPos == int(pos)) { cur->append(params.size() - 1, argPos); cur->append(argSlices); (*cur)[thisSlice].pos() = macroPos;