Skip to content

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

Closed
@lcartey

Description

@lcartey

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

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressImpact-MediumPhase IIfalse positive/false negativeAn issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding Standards

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions