Try alternative syntax for signaling false positive

This commit is contained in:
Jean-Marc Lasgouttes 2017-03-24 15:54:16 +01:00
parent b4fad55fd7
commit d7dfa27574

View File

@ -1476,8 +1476,9 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M
LYXERR(Debug::FIND, "Latexified replace_buffer: '" << repl_latex << "'");
string s;
// false positive from coverity
// coverity[CHECKED_RETURN]
// coverity[check_return]
regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1");
// coverity[check_return]
regex_replace(s, s, "\\\\\\[(.*)\\\\\\]", "$1");
repl_latex = from_utf8(s);
LYXERR(Debug::FIND, "Replacing by insert()ing latex: '" << repl_latex << "' cur=" << cur << " with depth=" << cur.depth());