codeql-coding-standards icon indicating copy to clipboard operation
codeql-coding-standards copied to clipboard

`RULE-11-4`: Consider `0` to be a null pointer constant.

Open lcartey opened this issue 2 years ago • 0 comments

Affected rules

  • RULE-11-1
  • RULE-11-4
  • RULE-11-5
  • RULE-11-6

Description

According to MISRA C 2012 8.11 zero is a null pointer constant, and so should not be flagged as non_compliant.

Example

unsigned int *v4 = 0; // COMPLIANT

lcartey avatar Jul 29 '23 00:07 lcartey