Project

General

Profile

Actions

Bug #806

closed

Analyse Logiscope LFR_3.1.0.4 : Tr_ParenArg Severity is High

Added by William Recart over 7 years ago. Updated almost 7 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

Actions #1

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

Actions #2

Updated by paul leroy about 7 years ago

  • Status changed from New to Resolved
Actions #3

Updated by paul leroy about 7 years ago

  • Priority changed from Normal to Low
Actions #4

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

Actions #5

Updated by William Recart about 7 years ago

  • Status changed from Resolved to Closed
Actions #6

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

Actions

Also available in: Atom PDF