commit 731dbddd1120ede02e14ec90d3d93207f76f9aec
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Thu Jun 9 15:51:07 2016 +0200

    Annotate source code to please coverity
    
    This code is signalled as a copy and paste error, but it is a false
    positive.
    
    According to the documentation, adding a comment starting with
      // coverity[name_of_error]
    should be enough to flag the false positive.

diff --git a/src/TextMetrics.cpp b/src/TextMetrics.cpp
index 6690f3c..b40cb55 100644
--- a/src/TextMetrics.cpp
+++ b/src/TextMetrics.cpp
@@ -481,6 +481,11 @@ bool TextMetrics::redoParagraph(pit_type const pit)
        if (text_->isMainText()) {
                if (pit == 0) {
                        pm.rows().front().dimension().asc += 20;
+                       /* coverity[copy_paste_error]: coverity thinks that we
+                        * should update pm.dim().asc below, but all the rows
+                        * heights are actually counted as part of the 
paragraph metric
+                        * descent see loop above).
+                        */
                        pm.dim().des += 20;
                }
                ParagraphList const & pars = text_->paragraphs();

Reply via email to