From cb888293d40b08192a04f287b689580b39c35bde Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Fri, 31 Mar 2017 11:38:30 +0200 Subject: [PATCH] A better way to tell coverity that we do not care about result --- src/lyxfind.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 441cbf18b3..bb4e985a54 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -1475,11 +1475,8 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M docstring repl_latex = ods.str(); LYXERR(Debug::FIND, "Latexified replace_buffer: '" << repl_latex << "'"); string s; - // false positive from coverity - // coverity[check_return] - regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1"); - // coverity[check_return] - regex_replace(s, s, "\\\\\\[(.*)\\\\\\]", "$1"); + (void)regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1"); + (void)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()); MathData ar(cur.buffer()); -- 2.39.2