Project

General

Profile

Actions

Bug #802

closed

Analyse Logiscope LFR_3.1.0.4 : rule Tr_Accolades Severity is High

Added by William Recart over 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Target version:
-
Start date:
19/10/2016
Due date:
% Done:

0%

Estimated time:
revision:
r0

Description

Rappel de la règle :
Tr_Accolades
Definition:
-----------
Block statements shall always be used in control statements (if , for , while , do).

Justification:
--------------
Removes ambiguity about the scope of instructions and makes the code easier to read
and to modify.

Example:
--------

// do not write
if (x 0) return;
else
while (x > min)
x--;

// write
if (x 0) {
return;
} else {
while (x > min) {
x--;
}
}

La règle n'est pas respectée dans 38 cas d'après Logiscope:
Fichier avf0_prc0.c : lignes 119, 132, 225, 234, 391, 396
Fichier avf1_prc1.c : lignes 120, 133, 226, 381
Fichier fsw_init.c : lignes 788, 792, 796
Fichier fsw_processing.c : ligne 565
Fichier fsw_processing.h : lignes 222, 227, 251, 256
Fichier fsw_spacewire.c : lignes 274, 278, 282, 286, 290, 294, 303, 975
Fichier lfr_cpu_usage_report.c : ligne 53
Fichier tc_acceptance.c : ligne 463
Fichier tc_handler.c : ligne 1585
Fichier tc_load_dump_parameters.c : lignes 1028, 1330, 1337
Fichier wf_handler.c : lignes 127, 199, 223, 248, 475, 1277

Actions

Also available in: Atom PDF