- I would like cpp:S963 to be added to C rules. Forgetting to add parenthesis around macro arguments can cause the same issues in both cpp and c languages.
- snippet of Noncompliant Code:
#define ms_to_us(time_ms) (time_ms * 1000)
- snippet of Compilant Code:
#define ms_to_us(time_ms) ((time_ms) * 1000)
- external references and/or language specifications: cpp:S963
- type : Code Smell
- Tags: cpp