Hi Gary, One of the possibility of patch breaking the legacy Application is following change, try to rollback this change and see:
=============================================================================================== diff --git a/src/amf/agent/ava_op.cc b/src/amf/agent/ava_op.cc --- a/src/amf/agent/ava_op.cc +++ b/src/amf/agent/ava_op.cc @@ -117,7 +117,6 @@ uint32_t ava_avnd_msg_prc(AVA_CB *cb, AV ******************************************************************************/ bool ava_B4_ver_used(AVA_CB *in_cb) { - AVA_CB *cb = 0; bool rc = false; if(in_cb) { @@ -125,8 +124,7 @@ bool ava_B4_ver_used(AVA_CB *in_cb) rc = true; } else { - - cb = (AVA_CB *)ncshm_take_hdl(NCS_SERVICE_ID_AVA, gl_ava_hdl); + AVA_CB *cb = (AVA_CB *)ncshm_take_hdl(NCS_SERVICE_ID_AVA, gl_ava_hdl); if(cb) { if((cb->version.releaseCode == 'B') && (cb->version.majorVersion == 0x04)) @@ -219,7 +217,7 @@ void amf_copy_from_SaAmfCallbacksT_4_to_ osaf_cbk->saAmfProxiedComponentInstantiateCallback = cbk->saAmfProxiedComponentInstantiateCallback; osaf_cbk->saAmfProxiedComponentCleanupCallback = cbk->saAmfProxiedComponentCleanupCallback; osaf_cbk->saAmfContainedComponentInstantiateCallback = cbk->saAmfContainedComponentInstantiateCallback; - osaf_cbk->saAmfContainedComponentInstantiateCallback = cbk->saAmfContainedComponentInstantiateCallback; + osaf_cbk->saAmfContainedComponentCleanupCallback = cbk->saAmfContainedComponentCleanupCallback; } /* @@ -238,7 +236,6 @@ void amf_copy_from_SaAmfCallbacksT_o4_to osaf_cbk->saAmfProxiedComponentInstantiateCallback = cbk->saAmfProxiedComponentInstantiateCallback; osaf_cbk->saAmfProxiedComponentCleanupCallback = cbk->saAmfProxiedComponentCleanupCallback; osaf_cbk->saAmfContainedComponentInstantiateCallback = cbk->saAmfContainedComponentInstantiateCallback; - osaf_cbk->saAmfContainedComponentInstantiateCallback = cbk->saAmfContainedComponentInstantiateCallback; - osaf_cbk->saAmfContainedComponentInstantiateCallback = cbk->saAmfContainedComponentInstantiateCallback; - osaf_cbk->osafCsiAttributeChangeCallback = cbk->osafCsiAttributeChangeCallback; + osaf_cbk->saAmfContainedComponentCleanupCallback = cbk->saAmfContainedComponentCleanupCallback; + osaf_cbk->osafCsiAttributeChangeCallback = cbk->osafCsiAttributeChangeCallback; } =============================================================================================== -AVM On 3/10/2017 1:12 PM, A V Mahesh wrote: > Hi Gary, > > Thanks for the initial inputs. > > The patch doesn't contain any in-service /backward compatible change , > just wondering > how this patch broken the legacy Application , can you please > code-snippet of your legacy Application, > that breaking the patch. > > -AVM > > On 3/10/2017 10:59 AM, Gary Lee wrote: >> Hi Mahesh >> >> Some of our legacy tests are failing after applying this series. >> >> I will do some debugging and send back details. >> >> Thanks >> Gary >> >> -----Original Message----- >> From: A V Mahesh <mahesh.va...@oracle.com> >> Date: Wednesday, 8 March 2017 at 11:28 pm >> To: <minh.c...@dektech.com.au>, gary <gary....@dektech.com.au>, >> <nagendr...@oracle.com>, <praveen.malv...@oracle.com> >> Cc: <opensaf-devel@lists.sourceforge.net> >> Subject: [PATCH 0 of 3] Review Request for amf: Fix all Cppcheck 1.77 issues >> [#2341] V1 >> >> Summary:amf: Fix all Cppcheck 1.77 issues [#2341] V1 >> Review request for Trac Ticket(s): #2341 >> Peer Reviewer(s): Amf Dev >> Pull request to: <<LIST THE PERSON WITH PUSH ACCESS HERE>> >> Affected branch(es): default, 5.2 >> Development branch: default >> >> -------------------------------- >> Impacted area Impact y/n >> -------------------------------- >> Docs n >> Build system n >> RPM/packaging n >> Configuration files n >> Startup scripts n >> SAF services n >> OpenSAF services y >> Core libraries n >> Samples n >> Tests n >> Other n >> >> >> Comments (indicate scope for each "y" above): >> --------------------------------------------- >> >> changeset b8e7593cf4eadaa6169fe635ac0df67560ea875a >> Author: A V Mahesh <mahesh.va...@oracle.com> >> Date: Wed, 08 Mar 2017 17:52:21 +0530 >> >> amfd: Fix all Cppcheck 1.77 issues [#2341] V1 >> >> [staging/src/amf/amfd/app.cc:285]: (style) The scope of the >> variable 'i' can >> be reduced. [staging/src/amf/amfd/apptype.cc:137]: (style) >> Condition 'rc!=0' >> is always false [staging/src/amf/amfd/apptype.cc:69]: (style) >> The scope of >> the variable 'sg_type' can be reduced. >> [staging/src/amf/amfd/chkop.cc:1297] >> -> [staging/src/amf/amfd/chkop.cc:1302]: (style) Variable 'uba' >> is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/ckpt_dec.cc:374] -> >> [staging/src/amf/amfd/ckpt_dec.cc:382]: (style) Variable >> 'status' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/ckpt_dec.cc:573] -> >> [staging/src/amf/amfd/ckpt_dec.cc:577]: (style) Variable >> 'status' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/ckpt_dec.cc:1109]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ckpt_edu.cc:51] -> >> [staging/src/amf/amfd/ckpt_edu.cc:56]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/ckpt_enc.cc:2281] -> >> [staging/src/amf/amfd/ckpt_enc.cc:2288]: (style) Variable >> 'status' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/ckpt_enc.cc:2314] -> >> [staging/src/amf/amfd/ckpt_enc.cc:2322]: (style) Variable >> 'status' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/ckpt_enc.cc:1951]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ckpt_enc.cc:1982]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ckpt_enc.cc:2015]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ckpt_enc.cc:2044]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ckpt_enc.cc:2076]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ckpt_enc.cc:2111]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ckpt_enc.cc:2151]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ckpt_enc.cc:2176]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ckpt_enc.cc:2216]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ckpt_enc.cc:2252]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ckpt_enc.cc:2470]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/clm.cc:344]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/cluster.cc:82]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/cluster.cc:95]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/cluster.cc:116]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/comp.cc:1270] -> >> [staging/src/amf/amfd/comp.cc:1285]: (style) Variable >> 'su_node_ptr' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/comp.cc:49]: (style) The scope of the >> variable 'rc' >> can be reduced. [staging/src/amf/amfd/comp.cc:947]: >> (performance) Prefer >> prefix ++/-- operators for non-primitive types. >> [staging/src/amf/amfd/compcstype.cc:92] -> >> [staging/src/amf/amfd/compcstype.cc:99]: (style) Variable 'cst' >> is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/compcstype.cc:46]: (style) The scope of >> the variable >> 'rc' can be reduced. [staging/src/amf/amfd/comptype.cc:417]: >> (style) The >> scope of the variable 'i' can be reduced. >> [staging/src/amf/amfd/csi.cc:626]: >> (warning) Comparison of a boolean expression with an integer. >> [staging/src/amf/amfd/csi.cc:1418] -> >> [staging/src/amf/amfd/csi.cc:1410]: >> (warning) Either the condition 'ptr!=nullptr' is redundant or >> there is >> possible null pointer dereference: ptr. >> [staging/src/amf/amfd/csi.cc:921] -> >> [staging/src/amf/amfd/csi.cc:925]: (style) Variable 'csi' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/csi.cc:1370] >> -> [staging/src/amf/amfd/csi.cc:1375]: (style) Variable >> 'i_attr' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/csi.cc:1491]: (style) The scope of the >> variable 'susi' >> can be reduced. [staging/src/amf/amfd/csi.cc:1492]: (style) The >> scope of the >> variable 'si' can be reduced. >> [staging/src/amf/amfd/csiattr.cc:541]: (style) >> The scope of the variable 'attribute' can be reduced. >> [staging/src/amf/amfd/ctcstype.cc:120]: (style) Condition >> 'rc!=0' is always >> false [staging/src/amf/amfd/ctcstype.cc:231] -> >> [staging/src/amf/amfd/ctcstype.cc:234]: (style) Variable >> 'ctcs_type' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/dmsg.cc:236]: (warning) Assignment of >> function >> parameter has no effect outside the function. Did you forget >> dereferencing >> it? [staging/src/amf/amfd/dmsg.cc:61] -> >> [staging/src/amf/amfd/dmsg.cc:66]: >> (style) Variable 'uba' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfd/hlttype.cc:64]: (style) The scope >> of the >> variable 'i' can be reduced. [staging/src/amf/amfd/imm.cc:1122] >> -> >> [staging/src/amf/amfd/imm.cc:1128]: (style) Variable 'temp' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:2299] >> -> [staging/src/amf/amfd/imm.cc:2300]: (style) Variable 'su' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:2354] >> -> [staging/src/amf/amfd/imm.cc:2359]: (style) Variable 'csi' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:2355] >> -> [staging/src/amf/amfd/imm.cc:2360]: (style) Variable 'comp' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:2387] >> -> [staging/src/amf/amfd/imm.cc:2388]: (style) Variable 'comp' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:2478] >> -> [staging/src/amf/amfd/imm.cc:2487]: (style) Variable 'csi' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:2479] >> -> [staging/src/amf/amfd/imm.cc:2488]: (style) Variable 'comp' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/imm.cc:1644]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/imm.cc:1891]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/imm.cc:1916]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/imm.cc:1934]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/imm.cc:1942]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/main.cc:257]: >> (style) The scope of the variable 'n2d_msg' can be reduced. >> [staging/src/amf/amfd/main.cc:290]: (style) The scope of the >> variable >> 'n2d_msg' can be reduced. [staging/src/amf/amfd/main.cc:323]: >> (style) The >> scope of the variable 'n2d_msg' can be reduced. >> [staging/src/amf/amfd/main.cc:405]: (style) The scope of the >> variable >> 'queue_evt' can be reduced. [staging/src/amf/amfd/main.cc:429]: >> (style) The >> scope of the variable 'fover_done' can be reduced. >> [staging/src/amf/amfd/mds.cc:505] -> >> [staging/src/amf/amfd/mds.cc:510]: >> (style) Variable 'evt' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfd/ndfsm.cc:116]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ndfsm.cc:125]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ndfsm.cc:177]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ndfsm.cc:225]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ndfsm.cc:741]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ndfsm.cc:777]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/ndfsm.cc:865]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/ndproc.cc:1101] -> >> [staging/src/amf/amfd/ndproc.cc:1103]: (style) Variable >> 'valid_info' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/ndproc.cc:317]: (style) The scope of the >> variable >> 'state_info_evt' can be reduced. >> [staging/src/amf/amfd/ndproc.cc:361]: >> (style) The scope of the variable 'state_info_evt' can be >> reduced. >> [staging/src/amf/amfd/ndproc.cc:735]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/node.cc:49]: >> (style) The scope of the variable 'rc' can be reduced. >> [staging/src/amf/amfd/node.cc:68]: (style) The scope of the >> variable 'rc' >> can be reduced. [staging/src/amf/amfd/node.cc:200]: >> (performance) Prefer >> prefix ++/-- operators for non-primitive types. >> [staging/src/amf/amfd/node.cc:582]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/node.cc:1555]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/node.cc:1571]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/nodegroup.cc:224]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/nodegroup.cc:1407]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/role.cc:855] -> >> [staging/src/amf/amfd/role.cc:864]: (style) Variable 'avnd' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/role.cc:903] >> -> [staging/src/amf/amfd/role.cc:914]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/role.cc:695]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/role.cc:709]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/role.cc:716]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/role.cc:722]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/role.cc:729]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/role.cc:1124]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/role.cc:1277]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/sg.cc:640]: (warning) Comparison of a >> boolean >> expression with an integer. [staging/src/amf/amfd/sg.cc:640]: >> (warning) >> Comparison of a boolean value using relational operator (<, >, >> <= or >=). >> [staging/src/amf/amfd/sg.cc:929]: (style) Expression is always >> false because >> 'else if' condition matches previous condition at line 922. >> [staging/src/amf/amfd/sg.cc:394]: (style) Condition 'rc!=0' is >> always false >> [staging/src/amf/amfd/sg.cc:42]: (style) The scope of the >> variable 'rc' can >> be reduced. [staging/src/amf/amfd/sg.cc:1145]: (style) The >> scope of the >> variable 'su' can be reduced. [staging/src/amf/amfd/sg.cc:2203]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/sg_2n_fsm.cc:3968] -> >> [staging/src/amf/amfd/sg_2n_fsm.cc:3969]: (style) Variable >> 'a_susi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_2n_fsm.cc:2789]: (style) The scope of >> the variable >> 'a_susi' can be reduced. >> [staging/src/amf/amfd/sg_2n_fsm.cc:2790]: (style) >> The scope of the variable 'o_su' can be reduced. >> [staging/src/amf/amfd/sg_nored_fsm.cc:111]: (style) The scope >> of the >> variable 'flag' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:2225] -> >> [staging/src/amf/amfd/sg_npm_fsm.cc:2233]: (style) Variable >> 'susi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_npm_fsm.cc:1071]: (style) The scope of >> the variable >> 'l_flag' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:1263]: (style) >> The scope of the variable 'l_flag' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:1391]: (style) The scope of >> the variable >> 'a_susi' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:1557]: (style) >> The scope of the variable 'flag' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:1557]: (style) The scope of >> the variable >> 'fover_progress' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:2460]: >> (style) The scope of the variable 'susi_assgn_failed' can be >> reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:2831]: (style) The scope of >> the variable >> 'o_susi' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:3786]: (style) >> The scope of the variable 'ot_susi' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:4064]: (style) The scope of >> the variable >> 'o_su' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:4065]: (style) >> The scope of the variable 'o_susi' can be reduced. >> [staging/src/amf/amfd/sg_npm_fsm.cc:4189]: (style) The scope of >> the variable >> 'rc' can be reduced. >> [staging/src/amf/amfd/sg_nway_fsm.cc:1139]: (warning) >> Assignment of function parameter has no effect outside the >> function. Did you >> forget dereferencing it? >> [staging/src/amf/amfd/sg_nway_fsm.cc:147] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:146]: (warning) Either the >> condition >> '!curr_susi' is redundant or there is possible null pointer >> dereference: >> curr_susi. [staging/src/amf/amfd/sg_nway_fsm.cc:148] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:146]: (warning) Either the >> condition >> '!curr_susi' is redundant or there is possible null pointer >> dereference: >> curr_susi. [staging/src/amf/amfd/sg_nway_fsm.cc:640] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:639]: (warning) Either the >> condition >> '!curr_susi' is redundant or there is possible null pointer >> dereference: >> curr_susi. [staging/src/amf/amfd/sg_nway_fsm.cc:641] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:639]: (warning) Either the >> condition >> '!curr_susi' is redundant or there is possible null pointer >> dereference: >> curr_susi. [staging/src/amf/amfd/sg_nway_fsm.cc:666] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:665]: (warning) Either the >> condition >> '!curr_susi' is redundant or there is possible null pointer >> dereference: >> curr_susi. [staging/src/amf/amfd/sg_nway_fsm.cc:667] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:665]: (warning) Either the >> condition >> '!curr_susi' is redundant or there is possible null pointer >> dereference: >> curr_susi. [staging/src/amf/amfd/sg_nway_fsm.cc:350] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:355]: (style) Variable >> 't_susi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_nway_fsm.cc:791] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:803]: (style) Variable >> 'susi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_nway_fsm.cc:1255] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:1257]: (style) Variable >> 'preferred_su' >> is reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_nway_fsm.cc:2785] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:2786]: (style) Variable >> 't_susi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_nway_fsm.cc:2864] -> >> [staging/src/amf/amfd/sg_nway_fsm.cc:2872]: (style) Variable >> 't_susi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sg_nway_fsm.cc:3479]: (style) The scope >> of the >> variable 'is_su_present' can be reduced. >> [staging/src/amf/amfd/sg_nway_fsm.cc:1285]: (performance) >> Prefer prefix >> ++/-- operators for non-primitive types. >> [staging/src/amf/amfd/sg_nway_fsm.cc:1410]: (performance) >> Prefer prefix >> ++/-- operators for non-primitive types. >> [staging/src/amf/amfd/sg_nwayact_fsm.cc:92]: (performance) >> Prefer prefix >> ++/-- operators for non-primitive types. >> [staging/src/amf/amfd/sgproc.cc:663] -> >> [staging/src/amf/amfd/sgproc.cc:664]: (style) Variable 'node' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/sgproc.cc:672] -> >> [staging/src/amf/amfd/sgproc.cc:673]: (style) Variable 'node' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/sgproc.cc:1887]: (style) Variable >> 'num_su' is modified >> but its new value is never used. >> [staging/src/amf/amfd/sgproc.cc:650]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/sgproc.cc:1501]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/sgtype.cc:86]: >> (style) The scope of the variable 'sut' can be reduced. >> [staging/src/amf/amfd/si.cc:165] -> >> [staging/src/amf/amfd/si.cc:172]: >> (style) Variable 'i_csi' is reassigned a value before the old >> one has been >> used. [staging/src/amf/amfd/si.cc:250] -> >> [staging/src/amf/amfd/si.cc:255]: >> (style) Variable 'prev_csi' is reassigned a value before the >> old one has >> been used. [staging/src/amf/amfd/si.cc:249] -> >> [staging/src/amf/amfd/si.cc:256]: (style) Variable 'i_csi' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/si.cc:1110] -> >> [staging/src/amf/amfd/si.cc:1111]: (style) Variable >> 'no_of_sisus_to_delete' >> is reassigned a value before the old one has been used. >> [staging/src/amf/amfd/si.cc:325]: (style) The scope of the >> variable 'temp' >> can be reduced. [staging/src/amf/amfd/si.cc:385]: (style) The >> scope of the >> variable 'rc' can be reduced. [staging/src/amf/amfd/si.cc:1490]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/si_dep.cc:301] -> >> [staging/src/amf/amfd/si_dep.cc:308]: (style) Variable 'dep_si' >> is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:302] -> >> [staging/src/amf/amfd/si_dep.cc:314]: (style) Variable >> 'spons_si_node' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:442] -> >> [staging/src/amf/amfd/si_dep.cc:447]: (style) Variable 'susi' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:532] -> >> [staging/src/amf/amfd/si_dep.cc:537]: (style) Variable 'evt' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:598] >> -> [staging/src/amf/amfd/si_dep.cc:605]: (style) Variable 'si' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:599] -> >> [staging/src/amf/amfd/si_dep.cc:606]: (style) Variable >> 'spons_si' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:856] -> >> [staging/src/amf/amfd/si_dep.cc:860]: (style) Variable 'si' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:915] >> -> [staging/src/amf/amfd/si_dep.cc:919]: (style) Variable >> 'spons_si' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:1617] -> >> [staging/src/amf/amfd/si_dep.cc:1621]: (style) Variable >> 'assignmemt_status' >> is reassigned a value before the old one has been used. >> [staging/src/amf/amfd/si_dep.cc:978]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/si_dep.cc:1023]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/si_dep.cc:1075]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/si_dep.cc:1470]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/si_dep.cc:1799]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/si_dep.cc:2058]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/si_dep.cc:2130]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/si_dep.cc:2194]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/si_dep.cc:2270]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/si_dep.cc:2524]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/siass.cc:1077] -> >> [staging/src/amf/amfd/siass.cc:1082]: (style) Variable 'node' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfd/siass.cc:452]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/siass.cc:473]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/siass.cc:1042]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/sirankedsu.cc:45] >> -> [staging/src/amf/amfd/sirankedsu.cc:51]: (style) Variable >> 'avd_si' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sirankedsu.cc:107] -> >> [staging/src/amf/amfd/sirankedsu.cc:113]: (style) Variable >> 'ranked_su_per_si' is reassigned a value before the old one has >> been used. >> [staging/src/amf/amfd/sirankedsu.cc:163] -> >> [staging/src/amf/amfd/sirankedsu.cc:176]: (style) Variable >> 'avd_sus_per_si_rank' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfd/sirankedsu.cc:235] -> >> [staging/src/amf/amfd/sirankedsu.cc:245]: (style) Variable >> 'avd_si' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/sirankedsu.cc:354]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/su.cc:518]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/su.cc:1948]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/sutype.cc:103]: >> (style) Condition 'rc!=0' is always false >> [staging/src/amf/amfd/util.cc:2022]: (warning) Possible null >> pointer >> dereference: avnd [staging/src/amf/amfd/util.cc:1272] -> >> [staging/src/amf/amfd/util.cc:1278]: (style) Variable 'd2n_msg' >> is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfd/util.cc:1566] -> >> [staging/src/amf/amfd/util.cc:1581]: >> (style) Variable 'rc' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfd/util.cc:2078]: (style) Consecutive >> return, >> break, continue, goto or throw statements are unnecessary. >> [staging/src/amf/amfd/util.cc:1032]: (style) The scope of the >> variable 'i' >> can be reduced. [staging/src/amf/amfd/util.cc:533]: >> (performance) Prefer >> prefix ++/-- operators for non-primitive types. >> [staging/src/amf/amfd/util.cc:541]: (performance) Prefer prefix >> ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/util.cc:1392]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/util.cc:1408]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/util.cc:1419]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/util.cc:1446]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/util.cc:1465]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/util.cc:1482]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/util.cc:1510]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/util.cc:1526]: (performance) Prefer >> prefix ++/-- >> operators for non-primitive types. >> [staging/src/amf/amfd/util.cc:1542]: >> (performance) Prefer prefix ++/-- operators for non-primitive >> types. >> [staging/src/amf/amfd/tests/test_amfdb.cc:29]: (style) The >> function 'SetUp' >> is never used. [staging/src/amf/amfd/tests/test_amfdb.cc:33]: >> (style) The >> function 'TearDown' is never used. >> [staging/src/amf/amfd/mds.cc:534]: >> (style) The function 'avd_avnd_mds_send' is never used. >> [staging/src/amf/amfd/ndmsg.cc:177]: (style) The function >> 'avd_mds_dec_flat' >> is never used. [staging/src/amf/amfd/ndmsg.cc:90]: (style) The >> function >> 'avd_mds_enc_flat' is never used. >> [staging/src/amf/amfd/ndfsm.cc:1000]: >> (style) The function 'avd_node_down' is never used. >> [staging/src/amf/amfd/ntf.cc:130]: (style) The function >> 'avd_send_cluster_reset_alarm' is never used. >> [staging/src/amf/amfd/ntf.cc:367]: (style) The function >> 'avd_send_su_ha_readiness_state_chg_ntf' is never used. >> [staging/src/amf/amfd/util.cc:296]: (style) The function >> 'avd_snd_oper_state_msg' is never used. >> [staging/src/amf/amfd/chkop.cc:132]: >> (style) The function 'avsv_mbcsv_deregister' is never used. >> [staging/src/amf/amfd/chkop.cc:1147]: (style) The function >> 'avsv_mbcsv_obj_set' is never used. >> [staging/src/amf/amfd/chkop.cc:865]: >> (style) The function 'avsv_send_ckpt_data' is never used. >> [staging/src/amf/amfd/node.cc:35]: (style) The function >> 'operator<' is never >> used. >> >> changeset 5f52154554ddaf6e6982d8eead722d9e993579ca >> Author: A V Mahesh <mahesh.va...@oracle.com> >> Date: Wed, 08 Mar 2017 17:53:17 +0530 >> >> amfnd: Fix all Cppcheck 1.77 issues [#2341] V1 >> [staging/src/amf/amfnd/amfnd.cc:58] -> >> [staging/src/amf/amfnd/amfnd.cc:63]: >> (style) Variable 'del_cbk' is reassigned a value before the old >> one has been >> used. [staging/src/amf/amfnd/amfnd.cc:59] -> >> [staging/src/amf/amfnd/amfnd.cc:65]: (style) Variable 'o_comp' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/amfnd.cc:191] -> >> [staging/src/amf/amfnd/amfnd.cc:199]: (style) Variable 'o_comp' >> is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfnd/amfnd.cc:249] -> >> [staging/src/amf/amfnd/amfnd.cc:250]: (style) Variable 'res' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/cbq.cc:441] >> -> [staging/src/amf/amfnd/cbq.cc:442]: (style) Variable >> 'temp_csi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfnd/cbq.cc:734] -> >> [staging/src/amf/amfnd/cbq.cc:748]: >> (style) Variable 'rc' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfnd/cbq.cc:1132] -> >> [staging/src/amf/amfnd/cbq.cc:1133]: (style) Variable >> 'temp_csi' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfnd/chc.cc:842]: (style) The scope of the >> variable >> 'cbk_rec' can be reduced. [staging/src/amf/amfnd/clc.cc:610] -> >> [staging/src/amf/amfnd/clc.cc:616]: (style) Variable 'clc_evt' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/clc.cc:1706] -> >> [staging/src/amf/amfnd/clc.cc:1710]: >> (style) Variable 'rc' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfnd/clc.cc:1747] -> >> [staging/src/amf/amfnd/clc.cc:1751]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/clc.cc:1949] >> -> [staging/src/amf/amfnd/clc.cc:1953]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/clc.cc:2368] -> >> [staging/src/amf/amfnd/clc.cc:2374]: >> (style) Variable 'csi' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfnd/clc.cc:3050] -> >> [staging/src/amf/amfnd/clc.cc:3051]: (style) Variable 'tmp' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/clc.cc:3170] >> -> [staging/src/amf/amfnd/clc.cc:3179]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/clc.cc:1354]: (style) The scope of the >> variable >> 'curr_rec' can be reduced. [staging/src/amf/amfnd/clc.cc:1382]: >> (style) The >> scope of the variable 'curr_rec' can be reduced. >> [staging/src/amf/amfnd/clc.cc:3040]: (style) The scope of the >> variable 'i' >> can be reduced. [staging/src/amf/amfnd/comp.cc:2557] -> >> [staging/src/amf/amfnd/comp.cc:2561]: (warning) Either the >> condition >> 'if(csi&&m_AVND_COMP_IS_ALL_CSI(comp))' is redundant or there >> is possible >> null pointer dereference: csi. >> [staging/src/amf/amfnd/comp.cc:2237] -> >> [staging/src/amf/amfnd/comp.cc:2250]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/comp.cc:2962] >> -> [staging/src/amf/amfnd/comp.cc:2972]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/compdb.cc:485]: (warning) Comparison of >> a boolean >> expression with an integer. >> [staging/src/amf/amfnd/compdb.cc:486]: (warning) >> Comparison of a boolean expression with an integer. >> [staging/src/amf/amfnd/compdb.cc:485]: (warning) Comparison of >> a boolean >> value using relational operator (<, >, <= or >=). >> [staging/src/amf/amfnd/compdb.cc:732] -> >> [staging/src/amf/amfnd/compdb.cc:734]: (warning) Either the >> condition >> '!compt' is redundant or there is possible null pointer >> dereference: compt. >> [staging/src/amf/amfnd/compdb.cc:718] -> >> [staging/src/amf/amfnd/compdb.cc:721]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/compdb.cc:1378]: (style) The scope of >> the variable >> 'env_counter' can be reduced. >> [staging/src/amf/amfnd/cpm.cc:150]: (warning) >> Assignment of function parameter has no effect outside the >> function. Did you >> forget dereferencing it? [staging/src/amf/amfnd/cpm.cc:105] -> >> [staging/src/amf/amfnd/cpm.cc:111]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/cpm.cc:141] >> -> [staging/src/amf/amfnd/cpm.cc:146]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/cpm.cc:331] >> -> [staging/src/amf/amfnd/cpm.cc:346]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/di.cc:1041] >> -> [staging/src/amf/amfnd/di.cc:1044]: (warning) Either the >> condition '!msg' >> is redundant or there is possible null pointer dereference: msg. >> [staging/src/amf/amfnd/di.cc:1352]: (warning) Possible null >> pointer >> dereference: pending_rec [staging/src/amf/amfnd/di.cc:999] -> >> [staging/src/amf/amfnd/di.cc:1015]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/di.cc:1391] >> -> [staging/src/amf/amfnd/di.cc:1397]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/di.cc:1507] >> -> [staging/src/amf/amfnd/di.cc:1514]: (style) Variable 'info' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/di.cc:1578]: (style) The scope of the >> variable 'pg' >> can be reduced. [staging/src/amf/amfnd/err.cc:387] -> >> [staging/src/amf/amfnd/err.cc:410]: (warning) Either the >> condition 'if(comp& >> >> &(m_AVND_COMP_PRES_STATE_IS_UNINSTANTIATED(comp)||m_AVND_COMP_PRES_STATE_IS_ >> >> INSTANTIATIONFAILED(comp)||m_AVND_COMP_PRES_STATE_IS_TERMINATIONFAILED(comp) >> ))' is redundant or there is possible null pointer dereference: >> comp. >> [staging/src/amf/amfnd/err.cc:400] -> >> [staging/src/amf/amfnd/err.cc:410]: >> (warning) Either the condition >> 'if(comp&&(m_AVND_COMP_PRES_STATE_IS_UNINSTAN >> >> TIATED(comp)||m_AVND_COMP_PRES_STATE_IS_INSTANTIATIONFAILED(comp)||m_AVND_CO >> MP_PRES_STATE_IS_TERMINATIONFAILED(comp)))' is redundant or >> there is >> possible null pointer dereference: comp. >> [staging/src/amf/amfnd/err.cc:314] >> -> [staging/src/amf/amfnd/err.cc:321]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/err.cc:667] >> -> [staging/src/amf/amfnd/err.cc:673]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/err.cc:695] >> -> [staging/src/amf/amfnd/err.cc:706]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/err.cc:801] >> -> [staging/src/amf/amfnd/err.cc:811]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/err.cc:938] >> -> [staging/src/amf/amfnd/err.cc:949]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/err.cc:1589] >> -> [staging/src/amf/amfnd/err.cc:1598]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/evt.cc:368] >> -> [staging/src/amf/amfnd/evt.cc:373]: (style) Variable >> 'ha_state_event' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfnd/hcdb.cc:73] -> >> [staging/src/amf/amfnd/hcdb.cc:75]: >> (style) Variable 'hc' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfnd/hcdb.cc:444] -> >> [staging/src/amf/amfnd/hcdb.cc:447]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/imm.cc:137] >> -> [staging/src/amf/amfnd/imm.cc:140]: (warning) Either the >> condition >> 'NCSCC_RC_SUCCESS!=res&&evt_ir' is redundant or there is >> possible null >> pointer dereference: evt_ir. [staging/src/amf/amfnd/imm.cc:38] >> -> >> [staging/src/amf/amfnd/imm.cc:44]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/main.cc:365] >> -> [staging/src/amf/amfnd/main.cc:369]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/main.cc:405] -> >> [staging/src/amf/amfnd/main.cc:412]: >> (style) Variable 'rc' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfnd/main.cc:507]: (style) The scope of >> the variable >> 'retry_cnt' can be reduced. [staging/src/amf/amfnd/mds.cc:104] >> -> >> [staging/src/amf/amfnd/mds.cc:107]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/mds.cc:875] >> -> [staging/src/amf/amfnd/mds.cc:882]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/mds.cc:1549] >> -> [staging/src/amf/amfnd/mds.cc:1556]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/mds.cc:1587] -> >> [staging/src/amf/amfnd/mds.cc:1599]: >> (style) Variable 'send_info' is reassigned a value before the >> old one has >> been used. [staging/src/amf/amfnd/mds.cc:1588] -> >> [staging/src/amf/amfnd/mds.cc:1600]: (style) Variable 'send' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/pg.cc:700] -> >> [staging/src/amf/amfnd/pg.cc:704]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/pg.cc:834] -> >> [staging/src/amf/amfnd/pg.cc:848]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/pg.cc:66]: >> (style) The scope of the variable 'i' can be reduced. >> [staging/src/amf/amfnd/pg.cc:301]: (style) The scope of the >> variable 'i' can >> be reduced. [staging/src/amf/amfnd/pg.cc:302]: (style) The >> scope of the >> variable 'pg_mem' can be reduced. >> [staging/src/amf/amfnd/pg.cc:400]: (style) >> The scope of the variable 'pg' can be reduced. >> [staging/src/amf/amfnd/pg.cc:473]: (style) The scope of the >> variable >> 'chg_mem' can be reduced. [staging/src/amf/amfnd/pg.cc:566]: >> (style) The >> scope of the variable 'curr' can be reduced. >> [staging/src/amf/amfnd/pg.cc:738]: (style) The scope of the >> variable 'i' can >> be reduced. [staging/src/amf/amfnd/pg.cc:582]: (performance) >> Prefer prefix >> ++/-- operators for non-primitive types. >> [staging/src/amf/amfnd/proxy.cc:332] -> >> [staging/src/amf/amfnd/proxy.cc:345]: (style) Variable >> 'nd_nd_ava_msg' is >> reassigned a value before the old one has been used. >> [staging/src/amf/amfnd/proxy.cc:646] -> >> [staging/src/amf/amfnd/proxy.cc:667]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/proxydb.cc:266] -> >> [staging/src/amf/amfnd/proxydb.cc:269]: (warning) Either the >> condition >> 'if(comp)' is redundant or there is possible null pointer >> dereference: comp. >> [staging/src/amf/amfnd/proxydb.cc:45] -> >> [staging/src/amf/amfnd/proxydb.cc:51]: (style) Variable 'rec' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/proxydb.cc:92] -> >> [staging/src/amf/amfnd/proxydb.cc:98]: (style) Variable 'rec' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/proxydb.cc:126] -> >> [staging/src/amf/amfnd/proxydb.cc:128]: (style) Variable 'rec' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/amfnd/sidb.cc:851] -> >> [staging/src/amf/amfnd/sidb.cc:857]: >> (style) Variable 'rc' is reassigned a value before the old one >> has been >> used. [staging/src/amf/amfnd/su.cc:1005] -> >> [staging/src/amf/amfnd/su.cc:1012]: (style) Variable 'comp' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/amfnd/sudb.cc:168] >> -> [staging/src/amf/amfnd/sudb.cc:167]: (warning) Either the >> condition '!su' >> is redundant or there is possible null pointer dereference: su. >> [staging/src/amf/amfnd/susm.cc:544]: (warning) Comparison of a >> boolean >> expression with an integer. >> [staging/src/amf/amfnd/susm.cc:3780] -> >> [staging/src/amf/amfnd/susm.cc:3770]: (warning) Either the >> condition 'csi' >> is redundant or there is possible null pointer dereference: csi. >> [staging/src/amf/amfnd/susm.cc:959]: (style) The scope of the >> variable >> 'are_si_assigned' can be reduced. >> [staging/src/amf/amfnd/susm.cc:1556]: >> (style) The scope of the variable 'is_en' can be reduced. >> [staging/src/amf/amfnd/susm.cc:2714]: (style) The scope of the >> variable 'is' >> can be reduced. [staging/src/amf/amfnd/util.cc:191]: (style) >> The scope of >> the variable 'str' can be reduced. >> [staging/src/amf/amfnd/sudb.cc:298]: >> (style) The function 'sudb_rec_comp_add' is never used. >> >> changeset fb22d0e8eb7ad1bf50f319313ff39c5f1b7034ae >> Author: A V Mahesh <mahesh.va...@oracle.com> >> Date: Wed, 08 Mar 2017 17:54:14 +0530 >> >> amfa: Fix all Cppcheck 1.77 issues [#2341] V1 >> [staging/src/amf/agent/ava_hdl.cc:59] -> >> [staging/src/amf/agent/ava_hdl.cc:67]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/agent/ava_hdl.cc:420]: (style) The scope of >> the variable >> 'rec' can be reduced. [staging/src/amf/agent/ava_hdl.cc:592]: >> (style) The >> scope of the variable 'i' can be reduced. >> [staging/src/amf/agent/ava_mds.cc:86] -> >> [staging/src/amf/agent/ava_mds.cc:90]: (style) Variable 'rc' is >> reassigned a >> value before the old one has been used. >> [staging/src/amf/agent/ava_mds.cc:149] -> >> [staging/src/amf/agent/ava_mds.cc:158]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/agent/ava_mds.cc:1020] -> >> [staging/src/amf/agent/ava_mds.cc:1028]: (style) Variable 'rc' >> is reassigned >> a value before the old one has been used. >> [staging/src/amf/agent/ava_mds.cc:1103] -> >> [staging/src/amf/agent/ava_mds.cc:1107]: (style) Variable 'msg' >> is >> reassigned a value before the old one has been used. >> [staging/src/amf/agent/ava_op.cc:221] -> >> [staging/src/amf/agent/ava_op.cc:222]: (style) Variable >> 'osaf_cbk.saAmfContainedComponentInstantiateCallback' is >> reassigned a value >> before the old one has been used. >> [staging/src/amf/agent/ava_op.cc:240] -> >> [staging/src/amf/agent/ava_op.cc:241]: (style) Variable >> 'osaf_cbk.saAmfContainedComponentInstantiateCallback' is >> reassigned a value >> before the old one has been used. >> [staging/src/amf/agent/ava_op.cc:241] -> >> [staging/src/amf/agent/ava_op.cc:242]: (style) Variable >> 'osaf_cbk.saAmfContainedComponentInstantiateCallback' is >> reassigned a value >> before the old one has been used. >> [staging/src/amf/agent/ava_op.cc:120]: >> (style) The scope of the variable 'cb' can be reduced. >> [staging/src/amf/agent/ava_hdl.cc:888]: (style) The function >> 'ava_hdl_pend_resp_get' is never used. >> [staging/src/amf/agent/ava_hdl.cc:820]: (style) The function >> 'ava_hdl_pend_resp_pop' is never used. >> [staging/src/amf/agent/ava_mds.cc:1132]: (style) The function >> 'ava_install_amf_down_cb' is never used. >> [staging/src/amf/agent/ava_init.cc:50]: (style) The function >> 'logtrace_init_constructor' is never used. >> [staging/src/amf/agent/amf_agent.cc:1330]: (style) The function >> 'saAmfCSIQuiescingComplete' is never used. >> [staging/src/amf/agent/amf_agent.cc:2719]: (style) The function >> 'saAmfComponentErrorClear_4' is never used. >> [staging/src/amf/agent/amf_agent.cc:2631]: (style) The function >> 'saAmfComponentErrorReport_4' is never used. >> [staging/src/amf/agent/amf_agent.cc:1256]: (style) The function >> 'saAmfComponentNameGet' is never used. >> [staging/src/amf/agent/amf_agent.cc:426]: (style) The function >> 'saAmfComponentRegister' is never used. >> [staging/src/amf/agent/amf_agent.cc:588]: (style) The function >> 'saAmfComponentUnregister' is never used. >> [staging/src/amf/agent/amf_agent.cc:2698]: (style) The function >> 'saAmfCorrelationIdsGet' is never used. >> [staging/src/amf/agent/amf_agent.cc:242]: (style) The function >> 'saAmfDispatch' is never used. >> [staging/src/amf/agent/amf_agent.cc:326]: >> (style) The function 'saAmfFinalize' is never used. >> [staging/src/amf/agent/amf_agent.cc:2326]: (style) The function >> 'saAmfHAReadinessStateSet' is never used. >> [staging/src/amf/agent/amf_agent.cc:1441]: (style) The function >> 'saAmfHAStateGet' is never used. >> [staging/src/amf/agent/amf_agent.cc:922]: >> (style) The function 'saAmfHealthcheckConfirm' is never used. >> [staging/src/amf/agent/amf_agent.cc:719]: (style) The function >> 'saAmfHealthcheckStart' is never used. >> [staging/src/amf/agent/amf_agent.cc:838]: (style) The function >> 'saAmfHealthcheckStop' is never used. >> [staging/src/amf/agent/amf_agent.cc:56]: (style) The function >> 'saAmfInitialize' is never used. >> [staging/src/amf/agent/amf_agent.cc:2120]: >> (style) The function 'saAmfInitialize_4' is never used. >> [staging/src/amf/agent/amf_agent.cc:2835]: (style) The function >> 'saAmfInitialize_o4' is never used. >> [staging/src/amf/agent/amf_agent.cc:2261]: (style) The function >> 'saAmfPmStart_3' is never used. >> [staging/src/amf/agent/amf_agent.cc:1141]: >> (style) The function 'saAmfPmStop' is never used. >> [staging/src/amf/agent/amf_agent.cc:2556]: (style) The function >> 'saAmfProtectionGroupNotificationFree_4' is never used. >> [staging/src/amf/agent/amf_agent.cc:1532]: (style) The function >> 'saAmfProtectionGroupTrack' is never used. >> [staging/src/amf/agent/amf_agent.cc:1709]: (style) The function >> 'saAmfProtectionGroupTrackStop' is never used. >> [staging/src/amf/agent/amf_agent.cc:2354]: (style) The function >> 'saAmfProtectionGroupTrack_4' is never used. >> [staging/src/amf/agent/amf_agent.cc:2777]: (style) The function >> 'saAmfResponse_4' is never used. >> [staging/src/amf/agent/amf_agent.cc:174]: >> (style) The function 'saAmfSelectionObjectGet' is never used. >> (information) >> Cppcheck cannot find all the include files (use --check-config >> for details) >> [staging/src/amf/amfwd/amf_wdog.c:106]: (warning) %u in format >> string (no. >> 1) requires 'unsigned int' but the argument type is 'int'. >> [staging/src/amf/amfwd/amf_wdog.c:108]: (style) Obsolete >> function 'asctime' >> called. It is recommended to use 'strftime' instead. >> (information) Cppcheck >> cannot find all the include files (use --check-config for >> details) >> [staging/src/amf/common/d2nmsg.c:272] -> >> [staging/src/amf/common/d2nmsg.c:273]: (style) Variable >> 'd_info.mem_list.notification' is reassigned a value before the >> old one has >> been used. [staging/src/amf/common/d2nmsg.c:230]: (style) The >> scope of the >> variable 'i' can be reduced. >> [staging/src/amf/common/d2nmsg.c:498]: (style) >> The scope of the variable 'i' can be reduced. >> [staging/src/amf/common/n2avamsg.c:495]: (warning) Assignment >> of function >> parameter has no effect outside the function. Did you forget >> dereferencing >> it? [staging/src/amf/common/n2avamsg.c:799]: (style) The >> function >> 'avsv_amf_csi_attr_convert' is never used. >> [staging/src/amf/common/util.c:284]: (style) The function >> 'avsv_amfcompcategory_to_avsvcomptype' is never used. >> [staging/src/amf/common/util.c:181]: (style) The function >> 'avsv_create_association_class_dn' is never used. >> [staging/src/amf/common/util.c:138]: (style) The function >> 'avsv_dblist_sahckey_cmp' is never used. >> [staging/src/amf/common/util.c:110]: (style) The function >> 'avsv_dblist_saname_cmp' is never used. >> [staging/src/amf/common/util.c:353]: >> (style) The function 'avsv_dblist_sastring_cmp' is never used. >> [staging/src/amf/common/util.c:60]: (style) The function >> 'avsv_dblist_uns32_cmp' is never used. >> [staging/src/amf/common/util.c:85]: >> (style) The function 'avsv_dblist_uns64_cmp' is never used. >> [staging/src/amf/common/d2nmsg.c:636]: (style) The function >> 'avsv_dnd_msg_copy' is never used. >> [staging/src/amf/common/d2nmsg.c:531]: >> (style) The function 'avsv_dnd_msg_free' is never used. >> [staging/src/amf/common/n2avamsg.c:77]: (style) The function >> 'avsv_nd2nd_avnd_msg_free' is never used. >> [staging/src/amf/common/n2avamsg.c:154]: (style) The function >> 'avsv_ndnd_avnd_msg_copy' is never used. >> [staging/src/amf/common/util.c:162]: (style) The function >> 'avsv_sa_name_is_null' is never used. >> [staging/src/amf/common/util.c:238]: >> (style) The function 'avsv_sanamet_init_from_association_dn' is >> never used. >> >> >> Complete diffstat: >> ------------------ >> src/amf/agent/ava_hdl.cc | 13 +++++-------- >> src/amf/agent/ava_mds.cc | 12 ++++-------- >> src/amf/agent/ava_op.cc | 11 ++++------- >> src/amf/amfd/app.cc | 3 +-- >> src/amf/amfd/apptype.cc | 9 +-------- >> src/amf/amfd/chkop.cc | 3 +-- >> src/amf/amfd/ckpt_dec.cc | 15 ++++++--------- >> src/amf/amfd/ckpt_edu.cc | 3 +-- >> src/amf/amfd/ckpt_enc.cc | 60 >> ++++++++++++++++++++++++------------------------------------ >> src/amf/amfd/clm.cc | 5 ++--- >> src/amf/amfd/cluster.cc | 16 ++++++---------- >> src/amf/amfd/comp.cc | 11 ++++------- >> src/amf/amfd/compcstype.cc | 7 ++----- >> src/amf/amfd/comptype.cc | 3 +-- >> src/amf/amfd/csi.cc | 23 ++++++++--------------- >> src/amf/amfd/csiattr.cc | 9 +++------ >> src/amf/amfd/ctcstype.cc | 10 +--------- >> src/amf/amfd/dmsg.cc | 4 +--- >> src/amf/amfd/hlttype.cc | 3 +-- >> src/amf/amfd/imm.cc | 49 >> +++++++++++++++++++------------------------------ >> src/amf/amfd/main.cc | 19 +++++-------------- >> src/amf/amfd/mds.cc | 4 +--- >> src/amf/amfd/ndfsm.cc | 35 >> ++++++++++++++--------------------- >> src/amf/amfd/ndproc.cc | 15 +++++---------- >> src/amf/amfd/node.cc | 24 +++++++++--------------- >> src/amf/amfd/nodegroup.cc | 10 ++++------ >> src/amf/amfd/role.cc | 42 >> ++++++++++++++++-------------------------- >> src/amf/amfd/sg.cc | 23 +++++------------------ >> src/amf/amfd/sg_2n_fsm.cc | 10 +++++----- >> src/amf/amfd/sg_nored_fsm.cc | 3 +-- >> src/amf/amfd/sg_npm_fsm.cc | 33 +++++++++++++-------------------- >> src/amf/amfd/sg_nway_fsm.cc | 39 >> ++++++++++++++------------------------- >> src/amf/amfd/sg_nwayact_fsm.cc | 5 ++--- >> src/amf/amfd/sgproc.cc | 16 +++++----------- >> src/amf/amfd/sgtype.cc | 3 +-- >> src/amf/amfd/si.cc | 24 ++++++++---------------- >> src/amf/amfd/si_dep.cc | 79 >> ++++++++++++++++++++++++++++--------------------------------------------------- >> src/amf/amfd/siass.cc | 18 +++++++----------- >> src/amf/amfd/sirankedsu.cc | 17 ++++++----------- >> src/amf/amfd/su.cc | 8 +++----- >> src/amf/amfd/sutype.cc | 6 ------ >> src/amf/amfd/util.cc | 69 >> ++++++++++++++++++++++++++------------------------------------------- >> src/amf/amfnd/amfnd.cc | 15 +++++++++------ >> src/amf/amfnd/cbq.cc | 9 +++------ >> src/amf/amfnd/chc.cc | 29 +++++++++++++++-------------- >> src/amf/amfnd/clc.cc | 35 >> +++++++++++++---------------------- >> src/amf/amfnd/comp.cc | 8 +++----- >> src/amf/amfnd/compdb.cc | 14 +++++++------- >> src/amf/amfnd/cpm.cc | 13 +++++-------- >> src/amf/amfnd/di.cc | 35 >> +++++++++++++++++------------------ >> src/amf/amfnd/err.cc | 35 >> ++++++++++++++--------------------- >> src/amf/amfnd/evt.cc | 3 +-- >> src/amf/amfnd/hcdb.cc | 7 +------ >> src/amf/amfnd/imm.cc | 5 ++--- >> src/amf/amfnd/main.cc | 8 +++----- >> src/amf/amfnd/mds.cc | 20 +++++++------------- >> src/amf/amfnd/pg.cc | 33 +++++++++++++++------------------ >> src/amf/amfnd/proxy.cc | 6 ++---- >> src/amf/amfnd/proxydb.cc | 17 +++++------------ >> src/amf/amfnd/sidb.cc | 3 +-- >> src/amf/amfnd/su.cc | 3 +-- >> src/amf/amfnd/sudb.cc | 5 ++--- >> src/amf/amfnd/susm.cc | 19 +++++++++---------- >> src/amf/amfnd/util.cc | 2 +- >> src/amf/amfwd/amf_wdog.c | 2 +- >> src/amf/common/d2nmsg.c | 7 ++----- >> src/amf/common/n2avamsg.c | 1 - >> src/amf/tools/amf_pm.c | 4 +--- >> 68 files changed, 413 insertions(+), 696 deletions(-) >> >> >> Testing Commands: >> ----------------- >> MF Functionality should work as it is. >> >> Testing, Expected Results: >> -------------------------- >> <<PASTE COMMAND OUTPUTS / TEST RESULTS>> >> >> >> Conditions of Submission: >> ------------------------- >> <<HOW MANY DAYS BEFORE PUSHING, CONSENSUS ETC>> >> >> >> Arch Built Started Linux distro >> ------------------------------------------- >> mips n n >> mips64 n n >> x86 n n >> x86_64 y y >> powerpc n n >> powerpc64 n n >> >> >> Reviewer Checklist: >> ------------------- >> [Submitters: make sure that your review doesn't trigger any >> checkmarks!] >> >> >> Your checkin has not passed review because (see checked entries): >> >> ___ Your RR template is generally incomplete; it has too many blank >> entries >> that need proper data filled in. >> >> ___ You have failed to nominate the proper persons for review and push. >> >> ___ Your patches do not have proper short+long header >> >> ___ You have grammar/spelling in your header that is unacceptable. >> >> ___ You have exceeded a sensible line length in your >> headers/comments/text. >> >> ___ You have failed to put in a proper Trac Ticket # into your commits. >> >> ___ You have incorrectly put/left internal data in your comments/files >> (i.e. internal bug tracking tool IDs, product names etc) >> >> ___ You have not given any evidence of testing beyond basic build >> tests. >> Demonstrate some level of runtime or other sanity testing. >> >> ___ You have ^M present in some of your files. These have to be >> removed. >> >> ___ You have needlessly changed whitespace or added whitespace crimes >> like trailing spaces, or spaces before tabs. >> >> ___ You have mixed real technical changes with whitespace and other >> cosmetic code cleanup changes. These have to be separate commits. >> >> ___ You need to refactor your submission into logical chunks; there is >> too much content into a single commit. >> >> ___ You have extraneous garbage in your review (merge commits etc) >> >> ___ You have giant attachments which should never have been sent; >> Instead you should place your content in a public tree to be >> pulled. >> >> ___ You have too many commits attached to an e-mail; resend as threaded >> commits, or place in a public tree for a pull. >> >> ___ You have resent this content multiple times without a clear >> indication >> of what has changed between each re-send. >> >> ___ You have failed to adequately and individually address all of the >> comments and change requests that were proposed in the initial >> review. >> >> ___ You have a misconfigured ~/.hgrc file (i.e. username, email etc) >> >> ___ Your computer have a badly configured date and time; confusing the >> the threaded patch review. >> >> ___ Your changes affect IPC mechanism, and you don't present any >> results >> for in-service upgradability test. >> >> ___ Your changes affect user manual and documentation, your patch >> series >> do not contain the patch that updates the Doxygen manual. >> >> >> >> > > ------------------------------------------------------------------------------ > Announcing the Oxford Dictionaries API! The API offers world-renowned > dictionary content that is easy and intuitive to access. Sign up for an > account today to start using our lexical data to power your apps and > projects. Get started today and enter our developer competition. > http://sdm.link/oxford > _______________________________________________ > Opensaf-devel mailing list > Opensaf-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel