Fixes coverity #23284, 23285, 23286, 23287, 23289.
GlueLength::GlueLength(string const & data)
{
GlueLength::GlueLength(string const & data)
{
+ // false positive from coverity
+ // coverity[CHECKED_RETURN]
isValidGlueLength(data, this);
}
isValidGlueLength(data, this);
}
// Either way, we just scan the rest and discard it
else {
Layout lay;
// Either way, we just scan the rest and discard it
else {
Layout lay;
+ // false positive from coverity
+ // coverity[CHECKED_RETURN]
readStyle(lexrc, lay);
}
break;
readStyle(lexrc, lay);
}
break;
// Ok extract the fields.
smatch sm;
// Ok extract the fields.
smatch sm;
+ // false positive from coverity
+ // coverity[CHECKED_RETURN]
regex_match(line, sm, reg);
//sm[0]; // whole matched string
regex_match(line, sm, reg);
//sm[0]; // whole matched string
// Strip any trailing commas
// "...foo,,,]" -> "...foo" ("...foo,,," may be empty)
static lyx::regex const back("^(.*[^,])?,*\\] *$");
// 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\": "
regex_match(output, what, back);
if (!what[0].matched) {
lyxerr << "Unable to sanitize LaTeX \"Option\": "
docstring repl_latex = ods.str();
LYXERR(Debug::FIND, "Latexified replace_buffer: '" << repl_latex << "'");
string s;
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);
regex_replace(to_utf8(repl_latex), s, "\\$(.*)\\$", "$1");
regex_replace(s, s, "\\\\\\[(.*)\\\\\\]", "$1");
repl_latex = from_utf8(s);