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
if (NumBlockSizes==0||NumBlockSizes>CFE_PLATFORM_ES_POOL_MAX_BUCKETS)
{
NumBlockSizes=CFE_PLATFORM_ES_POOL_MAX_BUCKETS;
}
}
EventID can never be 0 and RegName can never be NULL, if it was it would be a bug. This sort of thing (preventing a developer from introducing a bug with logic in production code) is better prevented via good unit test design. If a case is added it should check the event.
Describe the solution you'd like
Remove cases where an alternate condition can not be exercised
A step closer to being able to do MC/DC coverage
Remove unnecessary logic
Describe alternatives you've considered
Occasionally considered "future proofing" but developers should never depend on a condition being tested twice when modifying code.
Additional context
Triggers CodeQL warning
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Impossible to hit alternate case (even considering reconfiguration):
Status is always >= CFE_PLATFORM_TBL_MAX_SNGL_TABLE_SIZE (line 162) since it's checked at line 150:
cFE/fsw/cfe-core/src/tbl/cfe_tbl_internal.c
Lines 143 to 163 in c708d64
NumBlockSizes > CFE_PLATFORM_ES_POOL_MAX_BUCKETS is always false on line 203 since it's checked on 190:
cFE/fsw/cfe-core/src/es/cfe_es_mempool.c
Lines 189 to 207 in c708d64
EventID can never be 0 and RegName can never be NULL, if it was it would be a bug. This sort of thing (preventing a developer from introducing a bug with logic in production code) is better prevented via good unit test design. If a case is added it should check the event.
cFE/fsw/cfe-core/src/es/cfe_es_apps.c
Line 1295 in c708d64
Describe the solution you'd like
Remove cases where an alternate condition can not be exercised
Describe alternatives you've considered
Occasionally considered "future proofing" but developers should never depend on a condition being tested twice when modifying code.
Additional context
Triggers CodeQL warning
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: