commit b501b77e5e65a83185efe6a3c7ff9043ebdc0cbc
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Mon Apr 28 18:32:20 2025 +0200
Another go at convincing coverity scan that a a tabular is never empty
---
src/insets/InsetTabular.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp
index 915de0e97f..659f342289 100644
--- a/src/insets/InsetTabular.cpp
+++ b/src/insets/InsetTabular.cpp
@@ -7340,6 +7340,8 @@ void InsetTabular::tabularFeatures(Cursor & cur,
if (r == 0)
break;
}
+ // Tell Coverity Scan that a tabular is never empty
+ LATTEST(tabular.nrows() > 0);
if (sel_row_start >= tabular.nrows())
--sel_row_start;
cur.idx() = tabular.cellIndex(sel_row_start, column);
@@ -7366,6 +7368,8 @@ void InsetTabular::tabularFeatures(Cursor & cur,
if (c == 0)
break;
}
+ // Tell Coverity Scan that a tabular is never empty
+ LATTEST(tabular.ncols() > 0);
if (sel_col_start >= tabular.ncols())
--sel_col_start;
cur.idx() = tabular.cellIndex(row, sel_col_start);
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs