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

This silences -Wimplicit-fallthrough warnings with gcc7.
This commit is contained in:
Juergen Spitzmueller 2017-08-12 08:57:02 +02:00
parent df5c26da81
commit 6dc1884d05
15 changed files with 776 additions and 758 deletions

View File

@ -1,5 +1,5 @@
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
@ -101,7 +101,6 @@
\suppress_date true
\justification true
\use_refstyle 0
\use_minted 0
\notefontcolor #0000ff
\index Index
\shortcut idx
@ -112,9 +111,7 @@
\paragraph_separation skip
\defskip medskip
\is_math_indent 0
\math_numbering_side default
\quotes_style swiss
\dynamic_quotes 0
\papercolumns 1
\papersides 1
\paperpagestyle default
@ -829,37 +826,27 @@ status open
\begin_layout Plain Layout
\series bold
Nota:
\lang english
Note:
\series default
si vous avez un index dans votre document et si vous utiliser un des modules
pour les théorèmes AMS, il vous faut ajouter l'option
If you have an index list in your document and use one of the AMS theorem
modules, you have to add the option
\series bold
noglobalbang
\series default
dans le champ des options de classe des paramètres du document.
Ceci autorise l'usage du caractère
\begin_inset Quotes cld
to the document class options in the document settings.
This enables the usage of the '!' character in index entries (necessary
for subentries) but might cause troubles with the align environments (which
are described in section
\begin_inset Quotes eld
\end_inset
!
\begin_inset Quotes crd
Align Environments
\begin_inset Quotes erd
\end_inset
dans les entrées d'index (nécessaire pour saisir des sous-entrées) mais
peut créer des problèmes de conflit dans les environnements
\family sans
align
\family default
(décrits à la section
\begin_inset Quotes cld
\end_inset
Les environnements align
\begin_inset Quotes crd
\end_inset
du manuel Math de \SpecialChar LyX
's).
of \SpecialChar LyX
's Math manual).
\end_layout
\end_inset

View File

@ -1,5 +1,5 @@
#LyX 2.3 created this file. For more info see http://www.lyx.org/
\lyxformat 544
\lyxformat 541
\begin_document
\begin_header
\save_transient_properties true
@ -90,7 +90,6 @@ linguistics
\suppress_date false
\justification true
\use_refstyle 0
\use_minted 0
\index Index
\shortcut idx
\color #008000
@ -100,9 +99,7 @@ linguistics
\paragraph_separation indent
\paragraph_indentation default
\is_math_indent 0
\math_numbering_side default
\quotes_style french
\dynamic_quotes 0
\quotes_style swiss
\papercolumns 1
\papersides 1
\paperpagestyle default
@ -780,27 +777,23 @@ inline false
status open
\begin_layout Plain Layout
% Éviter les sauts de page dans les gloses de deux lignes
\end_layout
\begin_layout Plain Layout
\backslash
AtBeginDocument{%
\end_layout
\begin_layout Plain Layout
\backslash
renewenvironment{linggloss}[2][]{%
\end_layout
\begin_layout Plain Layout
\backslash
def
\backslash
@ -811,7 +804,6 @@ glt #1}%
\begin_layout Plain Layout
\backslash
begin{minipage}{.7
\backslash
@ -820,7 +812,6 @@ textwidth}
\begin_layout Plain Layout
\backslash
gll #2}{
\backslash
@ -832,7 +823,6 @@ end{minipage}}
\end_layout
\begin_layout Plain Layout
}
\end_layout
@ -852,27 +842,23 @@ inline false
status open
\begin_layout Plain Layout
% Éviter les sauts de page dans les gloses de trois lignes
\end_layout
\begin_layout Plain Layout
\backslash
AtBeginDocument{%
\end_layout
\begin_layout Plain Layout
\backslash
renewenvironment{lingglosss}[2][]{%
\end_layout
\begin_layout Plain Layout
\backslash
def
\backslash
@ -883,7 +869,6 @@ glt #1}%
\begin_layout Plain Layout
\backslash
begin{minipage}{.7
\backslash
@ -892,7 +877,6 @@ textwidth}
\begin_layout Plain Layout
\backslash
glll #2}{
\backslash
@ -904,7 +888,6 @@ end{minipage}}
\end_layout
\begin_layout Plain Layout
}
\end_layout
@ -994,17 +977,14 @@ inline false
status open
\begin_layout Plain Layout
Fournit covington 1
\end_layout
\begin_layout Plain Layout
AddToPreamble
\end_layout
\begin_layout Plain Layout
\backslash
let
@ -1015,7 +995,6 @@ relax
\end_layout
\begin_layout Plain Layout
\backslash
let
@ -1026,7 +1005,6 @@ relax
\end_layout
\begin_layout Plain Layout
\backslash
let
@ -1037,7 +1015,6 @@ relax
\end_layout
\begin_layout Plain Layout
\backslash
let
@ -1048,14 +1025,12 @@ relax
\end_layout
\begin_layout Plain Layout
\backslash
usepackage{covington}
\end_layout
\begin_layout Plain Layout
EndPreamble
\end_layout
@ -1476,14 +1451,12 @@ status open
\begin_layout Plain Layout
\backslash
floatstyle{plaintop}
\end_layout
\begin_layout Plain Layout
\backslash
restylefloat{tableau}
\end_layout
@ -1506,14 +1479,12 @@ status open
\begin_layout Plain Layout
\backslash
floatstyle{komaabove}
\end_layout
\begin_layout Plain Layout
\backslash
restylefloat{tableau}
\end_layout
@ -1637,7 +1608,6 @@ status open
\begin_layout Plain Layout
\backslash
renewcommand
\backslash
@ -1979,9 +1949,14 @@ literal "true"
status open
\begin_layout Plain Layout
Si vous utilisez les traitements usuels \SpecialChar LaTeX
ou PDF\SpecialChar LaTeX
, le paquetage
\lang english
If you use traditional \SpecialChar LaTeX
or PDF\SpecialChar LaTeX
, a prerequisite to use \SpecialChar LyX
's IPA support is
the \SpecialChar LaTeX
package
\emph on
tipa
\emph default
@ -1993,64 +1968,64 @@ literal "true"
\end_inset
est un prérequis à l'utilisation des fonctionnalités IPA de LyX; ce paquetage
est chargé automatiquement par \SpecialChar LyX
si vous respectez la procédure ci-après.
Si vous utilisez Xe\SpecialChar TeX
ou Lua\SpecialChar TeX
, which is automatically loaded by \SpecialChar LyX
if you follow the procedure described
below.
If you use Xe\SpecialChar TeX
or Lua\SpecialChar TeX
(i.
\begin_inset space \thinspace{}
\end_inset
e., si vous avez sélectionné
\begin_inset Quotes cld
e., if you have clicked
\begin_inset Quotes eld
\end_inset
Utiliser des polices non-\SpecialChar TeX
\begin_inset Quotes crd
Use non-\SpecialChar TeX
fonts
\begin_inset Quotes erd
\end_inset
via
in
\family sans
Document\SpecialChar menuseparator
Paramètres\SpecialChar menuseparator
Polices
Settings\SpecialChar menuseparator
Fonts
\family default
), le paquetage
), the package
\emph on
xunicode
\emph default
est chargé à la place (du fait que
is loaded instead (since
\emph on
tipa
\emph default
ne fonctionne pas dans ce contexte).
Le paquetage
does not work in this context).
The
\emph on
xunicode
\emph default
émule le résultat
package emulates the
\emph on
tipa
\emph default
, mais pas parfaitement, et certaines choses n'apparaîtront pas comme prévu.
De plus, il faut prendre soin de sélectionner une police non-TeX qui inclue
les glyphes IPA (comme
output, but is not perfect at that, so some things might not look as expected.
Furthermore, you need to take care in this case to use a non-TeX font that
includes the IPA glyphs (such as
\emph on
CMU Serif
\emph default
ou
or
\emph on
SIL Doulos
\emph default
).
Vous pouvez également spécifier une police supplémentaire uniquement pour
IPA en ajoutant ceci à
You can also specify an extra font only for IPA by adding the following
to
\family sans
Document\SpecialChar menuseparator
Paramètres\SpecialChar menuseparator
Préambule LaTeX
Settings\SpecialChar menuseparator
LaTeX Preamble
\family default
:
\end_layout
@ -2101,12 +2076,14 @@ ipafont}
\end_layout
\begin_layout Plain Layout
Enfin, et indépendamment de l'approche utilisée, il faut que le paquetage
\lang english
Additionally, and independent from which of the above approaches you use,
if you want to have instant preview, you should have the
\emph on
preview-latex
\emph default
package
\begin_inset CommandInset citation
LatexCommand cite
key "preview"
@ -2114,7 +2091,7 @@ literal "true"
\end_inset
soit installé pour avoir un aperçu sur le vif.
installed.
\end_layout
\end_inset
@ -2192,6 +2169,7 @@ Notez que si vous souhaitez insérer des diacritiques, ils doivent être saisis
\begin_inset IPA
\begin_layout Standard
[d̥]
\end_layout

BIN
po/fr.gmo

Binary file not shown.

1178
po/fr.po

File diff suppressed because it is too large Load Diff

View File

@ -4912,8 +4912,10 @@ void Buffer::Impl::setLabel(ParIterator & it, UpdateType utype) const
switch (par.itemdepth) {
case 2:
enumcounter += 'i';
// fall through
case 1:
enumcounter += 'i';
// fall through
case 0:
enumcounter += 'i';
break;

File diff suppressed because it is too large Load Diff

View File

@ -3871,13 +3871,13 @@ void Paragraph::locateWord(pos_type & from, pos_type & to,
to = from;
return;
}
// no break here, we go to the next
// fall through
case WHOLE_WORD:
// If we are already at the beginning of a word, do nothing
if (!from || isWordSeparator(from - 1))
break;
// no break here, we go to the next
// fall through
case PREVIOUS_WORD:
// always move the cursor to the beginning of previous word

View File

@ -2070,9 +2070,8 @@ void GuiApplication::dispatch(FuncRequest const & cmd, DispatchResult & dr)
if (current_view_ == 0)
createView();
}
// fall through
}
// fall through
default:
// The LFUN must be for one of GuiView, BufferView, Buffer or Cursor;
// let's try that:

View File

@ -1989,7 +1989,8 @@ bool GuiView::getStatus(FuncRequest const & cmd, FuncStatus & flag)
case LFUN_DIALOG_TOGGLE:
flag.setOnOff(isDialogVisible(cmd.getArg(0)));
// fall through to set "enable"
// to set "enable"
// fall through
case LFUN_DIALOG_SHOW: {
string const name = cmd.getArg(0);
if (!doc_buffer)

View File

@ -209,6 +209,8 @@ void InsetCaption::doDispatch(Cursor & cur, FuncRequest & cmd)
break;
}
}
// no "changetype":
// fall through
default:
InsetText::doDispatch(cur, cmd);

View File

@ -209,6 +209,8 @@ bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
flag.setEnabled(false);
return true;
}
// no subfloat:
// fall through
default:
return InsetCaptionable::getStatus(cur, cmd, flag);

View File

@ -214,6 +214,8 @@ bool InsetLabel::getStatus(Cursor & cur, FuncRequest const & cmd,
enabled = false;
break;
}
// no "changetype":
// fall through
default:
return InsetCommand::getStatus(cur, cmd, status);
}

View File

@ -441,6 +441,7 @@ bool InsetListings::getStatus(Cursor & cur, FuncRequest const & cmd,
return true;
}
}
// fall through
default:
return InsetCaptionable::getStatus(cur, cmd, status);
}

View File

@ -4676,12 +4676,14 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
// therefore allow always left but right and center only if there is no width
case Tabular::M_ALIGN_LEFT:
flag = false;
// fall through
case Tabular::ALIGN_LEFT:
status.setOnOff(tabular.getAlignment(cur.idx(), flag) == LYX_ALIGN_LEFT);
break;
case Tabular::M_ALIGN_RIGHT:
flag = false;
// fall through
case Tabular::ALIGN_RIGHT:
status.setEnabled(!(tabular.isMultiRow(cur.idx())
&& !tabular.getPWidth(cur.idx()).zero()));
@ -4690,6 +4692,7 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
case Tabular::M_ALIGN_CENTER:
flag = false;
// fall through
case Tabular::ALIGN_CENTER:
status.setEnabled(!(tabular.isMultiRow(cur.idx())
&& !tabular.getPWidth(cur.idx()).zero()));
@ -4710,6 +4713,7 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
case Tabular::M_VALIGN_TOP:
flag = false;
// fall through
case Tabular::VALIGN_TOP:
status.setEnabled(!tabular.getPWidth(cur.idx()).zero()
&& !tabular.isMultiRow(cur.idx()));
@ -4719,6 +4723,7 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
case Tabular::M_VALIGN_BOTTOM:
flag = false;
// fall through
case Tabular::VALIGN_BOTTOM:
status.setEnabled(!tabular.getPWidth(cur.idx()).zero()
&& !tabular.isMultiRow(cur.idx()));
@ -4728,6 +4733,7 @@ bool InsetTabular::getFeatureStatus(Cursor & cur, string const & s,
case Tabular::M_VALIGN_MIDDLE:
flag = false;
// fall through
case Tabular::VALIGN_MIDDLE:
status.setEnabled(!tabular.getPWidth(cur.idx()).zero()
&& !tabular.isMultiRow(cur.idx()));
@ -5006,7 +5012,7 @@ bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
status.setEnabled(false);
return true;
}
// Fall back
// fall through
case LFUN_NEWLINE_INSERT: {
if (tabular.getPWidth(cur.idx()).zero()) {
status.setEnabled(false);
@ -5660,6 +5666,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::M_VALIGN_BOTTOM:
case Tabular::M_VALIGN_MIDDLE:
flag = false;
// fall through
case Tabular::VALIGN_TOP:
case Tabular::VALIGN_BOTTOM:
case Tabular::VALIGN_MIDDLE:
@ -5782,6 +5789,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::SET_ALL_LINES:
setLines = true;
// fall through
case Tabular::UNSET_ALL_LINES:
for (row_type r = sel_row_start; r <= sel_row_end; ++r)
for (col_type c = sel_col_start; c <= sel_col_end; ++c) {
@ -5906,6 +5914,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::UNSET_LTFIRSTHEAD:
flag = false;
// fall through
case Tabular::SET_LTFIRSTHEAD:
tabular.getRowOfLTFirstHead(row, ltt);
checkLongtableSpecial(ltt, value, flag);
@ -5914,6 +5923,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::UNSET_LTHEAD:
flag = false;
// fall through
case Tabular::SET_LTHEAD:
tabular.getRowOfLTHead(row, ltt);
checkLongtableSpecial(ltt, value, flag);
@ -5922,6 +5932,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::UNSET_LTFOOT:
flag = false;
// fall through
case Tabular::SET_LTFOOT:
tabular.getRowOfLTFoot(row, ltt);
checkLongtableSpecial(ltt, value, flag);
@ -5930,6 +5941,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::UNSET_LTLASTFOOT:
flag = false;
// fall through
case Tabular::SET_LTLASTFOOT:
tabular.getRowOfLTLastFoot(row, ltt);
checkLongtableSpecial(ltt, value, flag);
@ -5938,6 +5950,7 @@ void InsetTabular::tabularFeatures(Cursor & cur,
case Tabular::UNSET_LTNEWPAGE:
flag = false;
// fall through
case Tabular::SET_LTNEWPAGE:
tabular.setLTNewPage(row, flag);
break;

View File

@ -1028,8 +1028,8 @@ void TeXOnePar(Buffer const & buf,
break;
}
}
// fall through possible
// possible
// fall through
default:
// we don't need it for the last paragraph!!!
if (nextpar)