commit 355395174bf50e1a3b8514e8eebec978c496d6ba
Author: Richard Heck <[email protected]>
Date:   Sat Jun 11 22:38:57 2016 -0400

    Mark a number of coverity false positives.
    
    Fixes coverity #23284, 23285, 23286, 23287, 23289.

diff --git a/src/Length.cpp b/src/Length.cpp
index d862f40..a55d2ef 100644
--- a/src/Length.cpp
+++ b/src/Length.cpp
@@ -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);
 }
 
diff --git a/src/TextClass.cpp b/src/TextClass.cpp
index e1e4027..b282ba3 100644
--- a/src/TextClass.cpp
+++ b/src/TextClass.cpp
@@ -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;
diff --git a/src/VCBackend.cpp b/src/VCBackend.cpp
index e0d9b4c..fbe367b 100644
--- a/src/VCBackend.cpp
+++ b/src/VCBackend.cpp
@@ -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
diff --git a/src/insets/ExternalTransforms.cpp 
b/src/insets/ExternalTransforms.cpp
index a3bf82d..ee31e19 100644
--- a/src/insets/ExternalTransforms.cpp
+++ b/src/insets/ExternalTransforms.cpp
@@ -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\": "
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index d7038de..69a9b80 100644
--- a/src/lyxfind.cpp
+++ b/src/lyxfind.cpp
@@ -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);

Reply via email to