Skip to content

A4-7-1: Exclude pointer increment/decrement #379

Closed
@lcartey

Description

@lcartey

Affected rules

  • A4-7-1

Description

This query is reporting ++ and -- on pointers, however the rule is restricted to data loss on integer operations.

In addition, the message currently says:

Binary expression ...++... may overflow.

Which is incorrect because we can also report unary expressions.

Example

pointer++; // Should be ignored

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressImpact-Highfalse 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