nasa / bp

The Bundle Protocol Core Flight System Application (BP) License: Apache-2.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Numerous cppcheck warnings reported

jphickey opened this issue · comments

Describe the bug
Executing "cppcheck" against the current main branch reports many warnings:

severity location error id issue
style fsw/src/bp_app.c:769 funcArgNamesDifferent Function 'BP_ProcessPkt' argument 1 names different: declaration 'MsgBufPtr' definition 'MessagePtr'.
style fsw/src/bp_app.c:105 unreadVariable Variable 'Mask' is assigned a value that is never used.
style fsw/src/bp_flow.c:788 duplicateCondition The if condition is the same as the previous if condition
warning fsw/src/bp_flow.c:1254 nullPointer Possible null pointer dereference: PrevFlowPtr
style fsw/src/bp_flow.c:545 funcArgNamesDifferent Function 'BP_FlowLoad' argument 1 names different: declaration 'FlowTableFileName' definition 'flow_table_filename'.
style fsw/src/bp_flow.c:679 funcArgNamesDifferent Function 'BP_FlowEnable' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:823 funcArgNamesDifferent Function 'BP_FlowDisable' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:898 funcArgNamesDifferent Function 'BP_FlowSetTimeout' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:898 funcArgNamesDifferent Function 'BP_FlowSetTimeout' argument 2 names different: declaration 'Timeout' definition 'timeout'.
style fsw/src/bp_flow.c:928 funcArgNamesDifferent Function 'BP_FlowRevertTimeout' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:944 funcArgNamesDifferent Function 'BP_FlowSetPriority' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:944 funcArgNamesDifferent Function 'BP_FlowSetPriority' argument 2 names different: declaration 'Priority' definition 'priority'.
style fsw/src/bp_flow.c:970 funcArgNamesDifferent Function 'BP_FlowRevertPriority' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:986 funcArgNamesDifferent Function 'BP_FlowIsEnabled' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1002 funcArgNamesDifferent Function 'BP_FlowGetStats' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1002 funcArgNamesDifferent Function 'BP_FlowGetStats' argument 2 names different: declaration 'Stat' definition 'stat'.
style fsw/src/bp_flow.c:1051 funcArgNamesDifferent Function 'BP_FlowClearStats' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1081 funcArgNamesDifferent Function 'BP_FlowGetHandle' argument 1 names different: declaration 'Name' definition 'name'.
style fsw/src/bp_flow.c:1112 funcArgNamesDifferent Function 'BP_FlowGetName' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1131 funcArgNamesDifferent Function 'BP_FlowFlush' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1155 funcArgNamesDifferent Function 'BP_FlowPause' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1182 funcArgNamesDifferent Function 'BP_FlowResume' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1286 funcArgNamesDifferent Function 'BP_FlowDirectStore' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1286 funcArgNamesDifferent Function 'BP_FlowDirectStore' argument 2 names different: declaration 'Buffer' definition 'buffer'.
style fsw/src/bp_flow.c:1286 funcArgNamesDifferent Function 'BP_FlowDirectStore' argument 3 names different: declaration 'Len' definition 'len'.
style fsw/src/bp_flow.c:1324 funcArgNamesDifferent Function 'BP_FlowDirectConfig' argument 1 names different: declaration 'Flow' definition 'fh'.
style fsw/src/bp_flow.c:1324 funcArgNamesDifferent Function 'BP_FlowDirectConfig' argument 2 names different: declaration 'Mode' definition 'mode'.
style fsw/src/bp_flow.c:1324 funcArgNamesDifferent Function 'BP_FlowDirectConfig' argument 3 names different: declaration 'Option' definition 'opt'.
style fsw/src/bp_flow.c:1324 funcArgNamesDifferent Function 'BP_FlowDirectConfig' argument 4 names different: declaration 'Value' definition 'val'.
style fsw/src/bp_flow.c:1324 constParameter Parameter 'val' can be declared with const
style fsw/src/bp_flow.c:58 unusedStructMember union member 'BP_SbIOBuffer_t::PacketSpace' is never used.
style fsw/src/bp_flow.c:393 unreadVariable Variable 'Status' is assigned a value that is never used.
style fsw/src/bp_io.c:213 funcArgNamesDifferent Function 'BP_IOOpen' argument 1 names different: declaration 'IOParm' definition 'CfgStr'.
style fsw/src/bp_io.c:213 funcArgNamesDifferent Function 'BP_IOOpen' argument 3 names different: declaration 'ioh' definition 'Descriptor'.
style fsw/src/bp_io.c:294 funcArgNamesDifferent Function 'BP_IOGetStats' argument 2 names different: declaration 'Stats' definition 'stats'.

35 error(s) reported

Expected behavior
Should run cleanly

System observed on:
Ubuntu 22.04 (cppcheck 2.7)

Reporter Info
Joseph Hickey, Vantage Systems, Inc.