]> git.lyx.org Git - features.git/commitdiff
Mark a number of coverity false positives.
authorRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 02:38:57 +0000 (22:38 -0400)
committerRichard Heck <rgheck@lyx.org>
Sun, 12 Jun 2016 03:09:30 +0000 (23:09 -0400)
Fixes coverity #23284, 23285, 23286, 23287, 23289.

src/Length.cpp
src/TextClass.cpp
src/VCBackend.cpp
src/insets/ExternalTransforms.cpp
src/lyxfind.cpp

index d862f40213d3a4bdea1e834bc0f3cf586d1b1616..a55d2ef8becf6a56b80e54be503db652188ed57d 100644 (file)
@@ -355,6 +355,8 @@ GlueLength::GlueLength(Length const & len, Length const & plus,
 
 GlueLength::GlueLength(string const & data)
 {
+       // false positive from coverity
+       // coverity[CHECKED_RETURN]
        isValidGlueLength(data, this);
 }
 
index e1e40272ea0651b71c21a9f657feead535c7cf56..b282ba380261a5277d97448ce9eb2d08212a2c3e 100644 (file)
@@ -528,6 +528,8 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
                        // Either way, we just scan the rest and discard it
                        else {
                                Layout lay;
+                               // false positive from coverity
+                               // coverity[CHECKED_RETURN]
                                readStyle(lexrc, lay);
                        }
                        break;
index e0d9b4cce48138ce8d7b62fecb5c81d357a33be8..fbe367b5f0a8c7b46416dcabf1feffb736203c46 100644 (file)
@@ -566,6 +566,8 @@ void CVS::scanMaster()
                        // Ok extract the fields.
                        smatch sm;
 
+                       // false positive from coverity
+                       // coverity[CHECKED_RETURN]
                        regex_match(line, sm, reg);
 
                        //sm[0]; // whole matched string
index a3bf82df65a08b612cf191233526a57e2c711e22..ee31e1911f3820b934912ab267e7cb46df7f1b57 100644 (file)
@@ -310,6 +310,8 @@ string const sanitizeLatexOption(string const & input)
        // Strip any trailing commas
        // "...foo,,,]" -> "...foo" ("...foo,,," may be empty)
        static lyx::regex const back("^(.*[^,])?,*\\] *$");
+       // false positive from coverity
+       // coverity[CHECKED_RETURN]
        regex_match(output, what, back);
        if (!what[0].matched) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "
index d7038dedcb1e66d4bc96bb8e328e81dd26f295c1..69a9b80883c37eaeb7bc14084484fa94e2b6920d 100644 (file)
@@ -1408,6 +1408,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[CHECKED_RETURN]
                regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1");
                regex_replace(s, s, "\\\\\\[(.*)\\\\\\]", "$1");
                repl_latex = from_utf8(s);