Bug #803
closedAnalyse Logiscope LFR_3.1.0.4 : Tr_BoucleSortie Severity is High
0%
Description
Rappel de la règle :
Tr_BoucleSortie
Definition:
-----------
Break and continue instructions are forbidden inside conditional expressions
in control statements ( for, do, while ).
Nevertheless, the break instruction is allowed in the block instruction
of the switch statement.
Parameters:
-----------
C++:
====
None.
JAVA:
=====
A string identifying the type of checking:
- "in_switch" (or no parameter) means that the break are allowed in switch
statements, break and continue are forbidden everywhere else,
- "without_label" means that any break or continue without a label is allowed,
- "with_label" means that any break and continue with a label is allowed,
break and continue without a label is forbidden everywhere.
Justification:
--------------
Like a goto, these instructions break down code structure. Prohibiting them
in loops makes the code easier to understand.
La règle n'est pas respectée dans 3 cas d'après Logiscope:
Fichier fsw_misc.c : ligne 266
Fichier fsw_spacewire.c : ligne 518
Fichier wf_handler.c : ligne 832
Updated by paul leroy almost 8 years ago
- Status changed from New to Resolved
- Priority changed from Normal to Low
Correction effectuée.
Updated by William Recart almost 8 years ago
- Status changed from Resolved to Closed
Vérification effectuée sur le tag 322 (c0603702c8c8) , il ne reste aucune erreur.
L'issue est considérée close.