Project

General

Profile

Bug #806

Analyse Logiscope LFR_3.1.0.4 : Tr_ParenArg Severity is High

Added by William Recart about 5 years ago. Updated over 4 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_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

History

#1 Updated by William Recart about 5 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.

#2 Updated by paul leroy almost 5 years ago

  • Status changed from New to Resolved

#3 Updated by paul leroy almost 5 years ago

  • Priority changed from Normal to Low

#4 Updated by William Recart almost 5 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.

#5 Updated by William Recart almost 5 years ago

  • Status changed from Resolved to Closed

#6 Updated by William Recart over 4 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.

Also available in: Atom PDF