1.4.34. Migration to 7.5.7¶
1.4.34.1. Stylecheck¶
FaultDetection-UninitializedVariable¶
In rules detecting uninitialized variables like FaultDetection-UninitializedVariable, CertC-EXP33,
CWE-Pointer-Issues-119, MisraC2012Directive-4.1, MisraC2019Directive-4.1, MisraC2023Directive-4.1, MisraC-9.1,
MisraC2012-9.1, AutosarC++18_03-A8.5.0, AutosarC++18_10-A8.5.0 and AutosarC++19_03-A8.5.0,
the option assume_parameters_are_initialized has been removed: if rhs in the assignment
arr[i] = rhs is uninitialized, the rule already reports a finding for rhs or one of its
predecessors in the data flow. For this reason, the analysis now considers the assignment to arr[i] = rhs always
as writing an initialized value to arr[i], thus avoiding propagated reports of uninitialized values (as it is already
the case for non-array variables).
Hence assume_parameters_are_initialized is no longer required.
Generic-RedundantEnumDefaultClause¶
This new rule was introduced to detect a default clause in a switch that is not needed because the switch has a case for all enumerators.
MisraC++-6.4.6¶
The MisraC++-6.4.6 rule was extended by an option nodefault_for_complete_enum
to complain about a redundant default clause via the above rule
Generic-RedundantEnumDefaultClause. The old option allow_complete_enum
only tolerated a missing default clause. Changing the default setting of both
options will cause a violation for any switch statement that has a case for all
enumerators, because a default clause will be either missing or redundant.