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
One common anti-pattern in cFS is to call functions that return
potential error codes, store the return values in variables, then
never bother to check the value of the variable.
cppcheck reports this as a redundant assignment.
Current cases in CFE:
(redundantAssignment)
{{{
cfe/fsw/cfe-core/src/evs/cfe_evs_task.c:1395: performance: Variable 'Status' is reassigned a value before the old one has been used.
cfe/fsw/cfe-core/src/evs/cfe_evs_task.c:1385: performance: Variable 'Status' is reassigned a value before the old one has been used.
}}}
(unreadVariable)
{{{
cfe/fsw/cfe-core/src/es/cfe_es_start.c:486: style: Variable 'status' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_api.c:469: style: Variable 'ReturnCode' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_api.c:1964: style: Variable 'Status' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_apps.c:740: style: Variable 'ReturnCode' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_apps.c:971: style: Variable 'ReturnCode' is assigned a value that is never used.
}}}
Not sure how we missed this in the 2016-04-12 sweep.
The text was updated successfully, but these errors were encountered:
One common anti-pattern in cFS is to call functions that return
potential error codes, store the return values in variables, then
never bother to check the value of the variable.
cppcheck reports this as a redundant assignment.
Current cases in CFE:
(redundantAssignment)
{{{
cfe/fsw/cfe-core/src/evs/cfe_evs_task.c:1395: performance: Variable 'Status' is reassigned a value before the old one has been used.
cfe/fsw/cfe-core/src/evs/cfe_evs_task.c:1385: performance: Variable 'Status' is reassigned a value before the old one has been used.
}}}
(unreadVariable)
{{{
cfe/fsw/cfe-core/src/es/cfe_es_start.c:486: style: Variable 'status' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_api.c:469: style: Variable 'ReturnCode' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_api.c:1964: style: Variable 'Status' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_apps.c:740: style: Variable 'ReturnCode' is assigned a value that is never used.
cfe/fsw/cfe-core/src/es/cfe_es_apps.c:971: style: Variable 'ReturnCode' is assigned a value that is never used.
}}}
Not sure how we missed this in the 2016-04-12 sweep.
The text was updated successfully, but these errors were encountered: