Skip to content

Rule 8.3: Consider anonymous structs and namespaces. #618

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

Closed
lcartey opened this issue Jun 7, 2024 · 0 comments · Fixed by #632
Closed

Rule 8.3: Consider anonymous structs and namespaces. #618

lcartey opened this issue Jun 7, 2024 · 0 comments · Fixed by #632
Assignees
Labels
Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Phase III user-report Issue reported by an end user of CodeQL Coding Standards

Comments

@lcartey
Copy link
Collaborator

lcartey commented Jun 7, 2024

Affected rules

  • RULE-8-3

Description

Anonymous structs provide an undistinguished qualified name - e.g. <anonymous struct>. This can cause false positives for this rule for structs which are not the same.

Example

struct OuterStruct {
	struct {
		SomeOtherStruct val[10];
		size_t size;
	} firstArray;

	struct {
		SomeOtherStruct val[10][2];
		size_t size;
	} secondArray;
};
@lcartey lcartey added Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium user-report Issue reported by an end user of CodeQL Coding Standards labels Jun 7, 2024
@mbaluda mbaluda self-assigned this Jul 3, 2024
mbaluda added a commit that referenced this issue Jul 3, 2024
@mbaluda mbaluda moved this from Triaged to Ready for review in Coding Standards Public Development Board Jul 3, 2024
@knewbury01 knewbury01 moved this from Ready for review to Reviewed in Coding Standards Public Development Board Jul 4, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 4, 2024
`Rule 8.3`: Consider anonymous structs and namespaces.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty-Medium A false positive or false negative report which is expected to take 1-5 days effort to address false positive/false negative An issue related to observed false positives or false negatives. Impact-Medium Phase III user-report Issue reported by an end user of CodeQL Coding Standards
Projects
Development

Successfully merging a pull request may close this issue.

3 participants