Bug #806
closedAnalyse Logiscope LFR_3.1.0.4 : Tr_ParenArg Severity is High
0%
Description
Rappel de la règle :
Tr_ParenArg
Definition:
-----------
Each occurrence of the macro parameters shall be enclosed in parenthesis
(or brackets) inside the macro definition.
Example:
--------
// do not write
#define GET_NAME(obj,ind) obj->name[ind]
// write
#define GET_NAME(obj,ind) (obj)->name[ind]
La règle n'est pas respectée dans 6 cas d'après Logiscope:
Fichier fsw_params.h : lignes 238, 239, 248, 249, 258, 259
Updated by William Recart about 8 years ago
Violation are due to use of debug macro to redefine printf() function in file fsw_params.h, see issue 804.
In case of redefining a function, only one parameter is used, no parenthesis (or brackets) are necessary.
Conclusion:
Rule is not considered as violated after analysis due to the fact that macro mentioned as violated consists in macro-functions.
Updated by William Recart almost 8 years ago
Vérification effectuée sur le tag 322 (c0603702c8c8) , il reste en erreur les mêmes lignes.
L'issue est considérée close.
Updated by William Recart almost 8 years ago
- Status changed from Resolved to Closed
Updated by William Recart over 7 years ago
Satus on FSW V3.2.0.15 :
- fsw_params.h : lines 17, 18, 27, 28, 37, 38: Violation are due to use of debug macro to redefine printf() function in file fsw_params.h. In case of redefining a function, only one parameter is used, no parenthesis (or brackets) are necessary.
This is considered as acceptable at LFR level.