From 5d29527916f74bcde767edf73dd9751775814b13 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 14 Mar 2017 15:20:09 +0100 Subject: [PATCH] Output debug message when creating bad length Coverity is right to say that we should check the return value. --- src/Length.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Length.cpp b/src/Length.cpp index 62b7c842f8..3aa610f659 100644 --- a/src/Length.cpp +++ b/src/Length.cpp @@ -21,6 +21,7 @@ #include "frontends/FontMetrics.h" +#include "support/debug.h" #include "support/docstream.h" #include "support/lstrings.h" #include "support/lyxlib.h" @@ -362,9 +363,8 @@ GlueLength::GlueLength(Length const & len, Length const & plus, GlueLength::GlueLength(string const & data) { - // false positive from coverity - // coverity[CHECKED_RETURN] - isValidGlueLength(data, this); + if (!isValidGlueLength(data, this)) + LYXERR0("Invalid glue length " + data); } -- 2.39.5