-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-MediumStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Description
Affected rules
- A7-1-3
Description
For some reason, A7-1-3
is triggered on basic varibales created from static_cast
Example
void false_positive() {
std::uint8_t u8{0};
auto const u32 = static_cast<std::uint32_t>(u8); // Triggers A7-1-3 warning
std::uint32_t const u32b = static_cast<std::uint32_t>(u8); // Triggers A7-1-3 warning
const auto u32c = static_cast<std::uint32_t>(u8); // Triggers A7-1-3 warning
const std::uint32_t u32d = static_cast<std::uint32_t>(u8); // Triggers A7-1-3 warning
}
Metadata
Metadata
Assignees
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-MediumStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.An issue related to observed false positives or false negatives.user-reportIssue reported by an end user of CodeQL Coding StandardsIssue reported by an end user of CodeQL Coding Standards
Type
Projects
Status
Done