commit 26322995b303a400d1c3a34aa10830a3e00d5599
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Sat Sep 12 20:11:26 2015 +0200
Annotate missing breaks in switch for coverity
Coverity issues 23344, 23354, 23371 and 102059
diff --git a/src/mathed/InsetMathNest.cpp b/src/mathed/InsetMathNest.cpp
index c17d384..94b4d68 100644
--- a/src/mathed/InsetMathNest.cpp
+++ b/src/mathed/InsetMathNest.cpp
@@ -636,6 +636,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest &
cmd)
case LFUN_CHAR_BACKWARD:
case LFUN_CHAR_FORWARD:
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor);
+ // fall through
case LFUN_CHAR_RIGHT_SELECT:
case LFUN_CHAR_LEFT_SELECT:
case LFUN_CHAR_BACKWARD_SELECT:
@@ -696,6 +697,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest &
cmd)
case LFUN_DOWN:
case LFUN_UP:
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor);
+ // fall through
case LFUN_DOWN_SELECT:
case LFUN_UP_SELECT: {
// close active macro
@@ -744,6 +746,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest &
cmd)
case LFUN_PARAGRAPH_UP:
case LFUN_PARAGRAPH_DOWN:
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor);
+ // fall through
case LFUN_PARAGRAPH_UP_SELECT:
case LFUN_PARAGRAPH_DOWN_SELECT:
break;
@@ -752,6 +755,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest &
cmd)
case LFUN_WORD_BACKWARD:
case LFUN_WORD_LEFT:
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor);
+ // fall through
case LFUN_LINE_BEGIN_SELECT:
case LFUN_WORD_BACKWARD_SELECT:
case LFUN_WORD_LEFT_SELECT:
@@ -777,6 +781,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest &
cmd)
case LFUN_WORD_RIGHT:
case LFUN_LINE_END:
cur.screenUpdateFlags(Update::Decoration | Update::FitCursor);
+ // fall through
case LFUN_WORD_FORWARD_SELECT:
case LFUN_WORD_RIGHT_SELECT:
case LFUN_LINE_END_SELECT:
@@ -993,11 +998,11 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest
& cmd)
case LFUN_FONT_DEFAULT:
handleFont(cur, cmd.argument(), "textnormal");
break;
-
case LFUN_FONT_UNDERLINE:
cur.recordUndo();
cur.handleNest(createInsetMath("underline", cur.buffer()));
break;
+
case LFUN_MATH_MODE: {
#if 1
// ignore math-mode on when already in math mode