Bug #806
closed
Analyse Logiscope LFR_3.1.0.4 : Tr_ParenArg Severity is High
Added by William Recart about 8 years ago.
Updated over 7 years ago.
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
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.
- Status changed from New to Resolved
- Priority changed from Normal to Low
Vérification effectuée sur le tag 322 (c0603702c8c8) , il reste en erreur les mêmes lignes.
L'issue est considérée close.
- Status changed from Resolved to Closed
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.
Also available in: Atom
PDF