Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
lcartey opened this issue Jul 29, 2023 · 0 comments · May be fixed by #332
Open

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

lcartey opened this issue Jul 29, 2023 · 0 comments · May be fixed by #332
Assignees
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Phase II user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@lcartey
Copy link
Collaborator

lcartey commented Jul 29, 2023

Affected rules

  • RULE-11-4

Description

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

Example

```cpp unsigned int *v4 = 0; // COMPLIANT ```
@lcartey lcartey added Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. labels Jul 29, 2023
@lcartey lcartey self-assigned this Jul 29, 2023
@lcartey lcartey linked a pull request Jul 29, 2023 that will close this issue
30 tasks
@ravikprasad ravikprasad added user-report Issue reported by an end user of CodeQL Coding Standards Phase II labels Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Low A false positive or false negative report which is expected to take <1 day effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Phase II user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

Successfully merging a pull request may close this issue.

2 participants