RULE-8-7
: Flags functions that are called in only one unit, different than the unit it is defined in
#864
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
user-report
Issue reported by an end user of CodeQL Coding Standards
Affected rules
Description
The query flags all functions that are called in only one unit, even if that unit is not the one where the function is defined. Technically, if we understand the term "referenced" as "called", this would indeed be a violation of the rule. But according to a MISRA official in this forum post, "referenced" should also include the definition of the function.
Example
Example taken from the forum post mentioned above. Here, bar() is flagged as a violation of the rule even if it is called from main.c.
The text was updated successfully, but these errors were encountered: