[LyX/master] Mark some intentional fall-throughs (in a way understandable to gcc)

2017-08-12 Thread Juergen Spitzmueller
commit 1249e5e13e8e0165eeef72917ffd4cdb472d027b
Author: Juergen Spitzmueller 
Date:   Sat Aug 12 09:06:29 2017 +0200

Mark some intentional fall-throughs (in a way understandable to gcc)

This silences -Wimplicit-fallthrough warnings with gcc7.

(Re-Apply without the unintended commits)
---
 src/LyXRC.cpp|  169 --
 src/Paragraph.cpp|4 +-
 src/frontends/qt4/GuiApplication.cpp |3 +-
 src/frontends/qt4/GuiView.cpp|3 +-
 src/insets/InsetCaption.cpp  |2 +
 src/insets/InsetFloat.cpp|2 +
 src/insets/InsetLabel.cpp|2 +
 src/insets/InsetListings.cpp |1 +
 src/insets/InsetTabular.cpp  |   15 +++-
 src/output_latex.cpp |4 +-
 10 files changed, 169 insertions(+), 36 deletions(-)

diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp
index 3a8328b..315495f 100644
--- a/src/LyXRC.cpp
+++ b/src/LyXRC.cpp
@@ -1324,7 +1324,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
-
+   // fall through
case RC_DEFFILE:
if (ignore_system_lyxrc ||
def_file != system_lyxrc.def_file) {
@@ -1341,7 +1341,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
   << "# MISC SECTION ##\n"
   << "#\n\n";
// bind files are not done here.
-
+   // fall through
case RC_PATH_PREFIX:
if (ignore_system_lyxrc ||
path_prefix != system_lyxrc.path_prefix) {
@@ -1349,6 +1349,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_UIFILE:
if (ignore_system_lyxrc ||
ui_file != system_lyxrc.ui_file) {
@@ -1357,6 +1358,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_AUTOREGIONDELETE:
if (ignore_system_lyxrc ||
auto_region_delete != system_lyxrc.auto_region_delete) {
@@ -1367,6 +1369,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_AUTORESET_OPTIONS:
if (ignore_system_lyxrc ||
auto_reset_options != system_lyxrc.auto_reset_options) {
@@ -1378,6 +1381,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_AUTOSAVE:
if (ignore_system_lyxrc ||
autosave != system_lyxrc.autosave) {
@@ -1386,6 +1390,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_DISPLAY_GRAPHICS:
if (ignore_system_lyxrc ||
display_graphics != system_lyxrc.display_graphics) {
@@ -1397,6 +1402,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_SORT_LAYOUTS:
if (ignore_system_lyxrc ||
sort_layouts != system_lyxrc.sort_layouts) {
@@ -1405,6 +1411,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_GROUP_LAYOUTS:
if (ignore_system_lyxrc ||
group_layouts != system_lyxrc.group_layouts) {
@@ -1413,6 +1420,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_VIEWDVI_PAPEROPTION:
if (ignore_system_lyxrc ||
view_dvi_paper_option
@@ -1424,6 +1432,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, 
string const & name) c
}
if (tag != RC_LAST)
break;
+   // fall through
case RC_CHKTEX_COMMAND:
if (ignore_system_lyxrc ||
chktex_command != system_lyxrc.chkte

Re: [LyX/master] Mark some intentional fall-throughs (in a way understandable to gcc)

2017-08-12 Thread Jürgen Spitzmüller
Am Samstag, den 12.08.2017, 08:58 +0200 schrieb Juergen Spitzmueller:
> lib/examples/fr/FeynmanDiagrams.lyx  |   41 +-
>  lib/examples/fr/linguistics.lyx  |  108 ++--
>  po/fr.gmo|  Bin 540537 -> 537846 bytes
>  po/fr.po | 1178 --
> 

Oops, sorry, I don't know why this happened. Will fix.

Jürgen

signature.asc
Description: This is a digitally signed message part


[LyX/master] Mark some intentional fall-throughs (in a way understandable to gcc)

2017-08-11 Thread Juergen Spitzmueller
commit 6dc1884d05ee0d51dd896c7b924fdec758ea3d8e
Author: Juergen Spitzmueller 
Date:   Sat Aug 12 08:57:02 2017 +0200

Mark some intentional fall-throughs (in a way understandable to gcc)

This silences -Wimplicit-fallthrough warnings with gcc7.

 lib/examples/fr/FeynmanDiagrams.lyx  |   41 +-
 lib/examples/fr/linguistics.lyx  |  108 ++--
 po/fr.gmo|  Bin 540537 -> 537846 bytes
 po/fr.po | 1178 --
 src/Buffer.cpp   |2 +
 src/LyXRC.cpp|  169 -
 src/Paragraph.cpp|4 +-
 src/frontends/qt4/GuiApplication.cpp |3 +-
 src/frontends/qt4/GuiView.cpp|3 +-
 src/insets/InsetCaption.cpp  |2 +
 src/insets/InsetFloat.cpp|2 +
 src/insets/InsetLabel.cpp|2 +
 src/insets/InsetListings.cpp |1 +
 src/insets/InsetTabular.cpp  |   15 +-
 src/output_latex.cpp |4 +-
 15 files changed, 776 insertions(+), 758 deletions(-)