You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
gcov reports missing branch coverage for the default case of a switch statement. Numerous examples in cFE where there is no default case and/or it's impossible to reach (all cases are handled explicitly).
Describe the solution you'd like
At minimum document this behavior in the coverage report. Would be nice if there was an option or alternative to get gcov to not report impossible cases as uncovered, or post-process the report to remove.
The text was updated successfully, but these errors were encountered:
astrogeco
changed the title
Document gcov limitation with default cases.
Document gcov limitation with switch statements and unhandled values
Jul 15, 2021
skliper
changed the title
Document gcov limitation with switch statements and unhandled values
Document gcov limitation with switch statements and unreachable default case
Jul 19, 2021
skliper
changed the title
Document gcov limitation with switch statements and unreachable default case
Uncovered default switch "branch" (vs unreachable default switch code) in gcov coverage report
Aug 24, 2021
Currently tracking issue in:
10 in cfe_sb_api.c
2 in cfe_sb_task.c
PendingEventId is always set if "Status" is not CFE_SUCCESS. There is no switch case that is "default" although I do recommend having a default case in the switch statement for "defense" against future code change, just in case someone forgets to add an event message. Code coverage is not possible.
Is your feature request related to a problem? Please describe.
gcov reports missing branch coverage for the default case of a switch statement. Numerous examples in cFE where there is no default case and/or it's impossible to reach (all cases are handled explicitly).
Describe the solution you'd like
At minimum document this behavior in the coverage report. Would be nice if there was an option or alternative to get gcov to not report impossible cases as uncovered, or post-process the report to remove.
Describe alternatives you've considered
None
Additional context
cfe_sb_api.c - 10 uncovered branches
cfe_sb_task.c - 2 uncovered branches
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: