commit 5d29527916f74bcde767edf73dd9751775814b13
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Tue Mar 14 15:20:09 2017 +0100
Output debug message when creating bad length
Coverity is right to say that we should check the return value.
---
src/Length.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/Length.cpp b/src/Length.cpp
index 62b7c84..3aa610f 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);
}