Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

RULE-8-13: Consider assignment to struct fields as writing to pointer to object #762

Copy link
Copy link
Closed
@lcartey

Description

@lcartey
Issue body actions

Affected rules

  • RULE-8-13

Description

Writing to a struct field should be considered writing to the object itself.

Example

struct S {
  int* x;
};

void example_function(struct S s) { // COMPLIANT - can't be const, written to in struct call
  s->x = 1;
}

Metadata

Metadata

Assignees

Labels

Difficulty-LowA false positive or false negative report which is expected to take <1 day effort to addressA 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.An issue related to observed false positives or false negatives.

Type

No type

Projects

Status

Done
Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.