Hi AMF dev, A gentle reminder for review.
So far I have received comments for Gary , If you guys doesn't have any other comments , I will push by tomorrow EOD. -AVM On 3/20/2017 10:49 AM, A V Mahesh wrote: > Summary:amf: Fix all Cppcheck 1.77 issues [#2341] V3 > 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 > 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 efb3364a0779447b858cbd0cdae1b92f0a2d2716 > Author: A V Mahesh <[email protected]> > Date: Mon, 20 Mar 2017 10:33:35 +0530 > > amfd: Fix all Cppcheck 1.77 issues [#2341] V3 > > V3 fixed review commets. > > [src/amf/amfd/app.cc:285]: (style) The scope of the variable 'i' can be > reduced. [src/amf/amfd/apptype.cc:137]: (style) Condition 'rc!=0' is > always > false [src/amf/amfd/apptype.cc:89] -> [src/amf/amfd/apptype.cc:84]: > (warning, inconclusive) Either the condition > '(attr=attributes[i++])!=nullptr' is redundant or there is possible null > pointer dereference: attr. [src/amf/amfd/apptype.cc:129] -> > [src/amf/amfd/apptype.cc:124]: (warning, inconclusive) Either the > condition > '(attr=attributes[i++])!=nullptr' is redundant or there is possible null > pointer dereference: attr. [src/amf/amfd/apptype.cc:69]: (style) The > scope > of the variable 'sg_type' can be reduced. [src/amf/amfd/chkop.cc:1297] > -> > [src/amf/amfd/chkop.cc:1302]: (style) Variable 'uba' is reassigned a > value > before the old one has been used. [src/amf/amfd/ckpt_dec.cc:374] -> > [src/amf/amfd/ckpt_dec.cc:382]: (style) Variable 'status' is reassigned > a > value before the old one has been used. [src/amf/amfd/ckpt_dec.cc:573] > -> > [src/amf/amfd/ckpt_dec.cc:577]: (style) Variable 'status' is reassigned > a > value before the old one has been used. [src/amf/amfd/ckpt_dec.cc:1109]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ckpt_edu.cc:51] -> [src/amf/amfd/ckpt_edu.cc:56]: (style) > Variable 'rc' is reassigned a value before the old one has been used. > [src/amf/amfd/ckpt_enc.cc:2281] -> [src/amf/amfd/ckpt_enc.cc:2288]: > (style) > Variable 'status' is reassigned a value before the old one has been > used. > [src/amf/amfd/ckpt_enc.cc:2314] -> [src/amf/amfd/ckpt_enc.cc:2322]: > (style) > Variable 'status' is reassigned a value before the old one has been > used. > [src/amf/amfd/ckpt_enc.cc:1951]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/ckpt_enc.cc:1982]: (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ckpt_enc.cc:2015]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/ckpt_enc.cc:2044]: (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ckpt_enc.cc:2076]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/ckpt_enc.cc:2111]: (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ckpt_enc.cc:2151]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/ckpt_enc.cc:2176]: (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ckpt_enc.cc:2216]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/ckpt_enc.cc:2252]: (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ckpt_enc.cc:2470]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/clm.cc:452] -> > [src/amf/amfd/clm.cc:456]: (style, inconclusive) Variable 'error' is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfd/clm.cc:473] -> > [src/amf/amfd/clm.cc:475]: > (style, inconclusive) Variable 'error' is reassigned a value before the > old > one has been used if variable is no semaphore variable. > [src/amf/amfd/clm.cc:344]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/cluster.cc:82]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/cluster.cc:95]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/cluster.cc:116]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/comp.cc:1270] > -> [src/amf/amfd/comp.cc:1285]: (style) Variable 'su_node_ptr' is > reassigned > a value before the old one has been used. [src/amf/amfd/comp.cc:49]: > (style) > The scope of the variable 'rc' can be reduced. > [src/amf/amfd/comp.cc:947]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/compcstype.cc:92] -> [src/amf/amfd/compcstype.cc:99]: > (style) > Variable 'cst' is reassigned a value before the old one has been used. > [src/amf/amfd/compcstype.cc:46]: (style) The scope of the variable 'rc' > can > be reduced. [src/amf/amfd/comptype.cc:417]: (style) The scope of the > variable 'i' can be reduced. [src/amf/amfd/csi.cc:626]: (warning) > Comparison > of a boolean expression with an integer. [src/amf/amfd/csi.cc:1418] -> > [src/amf/amfd/csi.cc:1410]: (warning) Either the condition > 'ptr!=nullptr' is > redundant or there is possible null pointer dereference: ptr. > [src/amf/amfd/csi.cc:921] -> [src/amf/amfd/csi.cc:925]: (style) Variable > 'csi' is reassigned a value before the old one has been used. > [src/amf/amfd/csi.cc:1370] -> [src/amf/amfd/csi.cc:1375]: (style) > Variable > 'i_attr' is reassigned a value before the old one has been used. > [src/amf/amfd/csi.cc:1491]: (style) The scope of the variable 'susi' > can be > reduced. [src/amf/amfd/csi.cc:1492]: (style) The scope of the variable > 'si' > can be reduced. [src/amf/amfd/csiattr.cc:541]: (style) The scope of the > variable 'attribute' can be reduced. [src/amf/amfd/ctcstype.cc:120]: > (style) > Condition 'rc!=0' is always false [src/amf/amfd/ctcstype.cc:231] -> > [src/amf/amfd/ctcstype.cc:234]: (style) Variable 'ctcs_type' is > reassigned a > value before the old one has been used. [src/amf/amfd/dmsg.cc:236]: > (warning) Assignment of function parameter has no effect outside the > function. Did you forget dereferencing it? [src/amf/amfd/dmsg.cc:61] -> > [src/amf/amfd/dmsg.cc:66]: (style) Variable 'uba' is reassigned a value > before the old one has been used. [src/amf/amfd/hlttype.cc:64]: (style) > The > scope of the variable 'i' can be reduced. [src/amf/amfd/imm.cc:1122] -> > [src/amf/amfd/imm.cc:1128]: (style) Variable 'temp' is reassigned a > value > before the old one has been used. [src/amf/amfd/imm.cc:1343] -> > [src/amf/amfd/imm.cc:1354]: (style, inconclusive) Variable 'rc' is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfd/imm.cc:1771] -> > [src/amf/amfd/imm.cc:1772]: (style, inconclusive) Variable 'class_type' > is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfd/imm.cc:2299] -> > [src/amf/amfd/imm.cc:2300]: (style) Variable 'su' is reassigned a value > before the old one has been used. [src/amf/amfd/imm.cc:2354] -> > [src/amf/amfd/imm.cc:2359]: (style) Variable 'csi' is reassigned a value > before the old one has been used. [src/amf/amfd/imm.cc:2355] -> > [src/amf/amfd/imm.cc:2360]: (style) Variable 'comp' is reassigned a > value > before the old one has been used. [src/amf/amfd/imm.cc:2387] -> > [src/amf/amfd/imm.cc:2388]: (style) Variable 'comp' is reassigned a > value > before the old one has been used. [src/amf/amfd/imm.cc:2478] -> > [src/amf/amfd/imm.cc:2487]: (style) Variable 'csi' is reassigned a value > before the old one has been used. [src/amf/amfd/imm.cc:2479] -> > [src/amf/amfd/imm.cc:2488]: (style) Variable 'comp' is reassigned a > value > before the old one has been used. [src/amf/amfd/imm.cc:1644]: > (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/imm.cc:1891]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/imm.cc:1916]: (performance) Prefer > prefix > ++/-- operators for non-primitive types. [src/amf/amfd/imm.cc:1934]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/imm.cc:1942]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/main.cc:257]: (style) The scope of > the > variable 'n2d_msg' can be reduced. [src/amf/amfd/main.cc:290]: (style) > The > scope of the variable 'n2d_msg' can be reduced. > [src/amf/amfd/main.cc:323]: > (style) The scope of the variable 'n2d_msg' can be reduced. > [src/amf/amfd/main.cc:405]: (style) The scope of the variable > 'queue_evt' > can be reduced. [src/amf/amfd/main.cc:429]: (style) The scope of the > variable 'fover_done' can be reduced. [src/amf/amfd/mds.cc:505] -> > [src/amf/amfd/mds.cc:510]: (style) Variable 'evt' is reassigned a value > before the old one has been used. [src/amf/amfd/ndfsm.cc:116]: > (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ndfsm.cc:125]: (performance) Prefer prefix ++/-- > operators for > non-primitive types. [src/amf/amfd/ndfsm.cc:177]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ndfsm.cc:225]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ndfsm.cc:741]: (performance) Prefer prefix ++/-- > operators for > non-primitive types. [src/amf/amfd/ndfsm.cc:777]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ndfsm.cc:865]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ndproc.cc:1101] -> [src/amf/amfd/ndproc.cc:1103]: (style) > Variable 'valid_info' is reassigned a value before the old one has been > used. [src/amf/amfd/ndproc.cc:317]: (style) The scope of the variable > 'state_info_evt' can be reduced. [src/amf/amfd/ndproc.cc:361]: (style) > The > scope of the variable 'state_info_evt' can be reduced. > [src/amf/amfd/ndproc.cc:735]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/node.cc:49]: (style) The scope > of the > variable 'rc' can be reduced. [src/amf/amfd/node.cc:68]: (style) The > scope > of the variable 'rc' can be reduced. [src/amf/amfd/node.cc:200]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/node.cc:582]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/node.cc:1555]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/node.cc:1571]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/nodegroup.cc:77] -> [src/amf/amfd/nodegroup.cc:72]: > (warning, > inconclusive) Either the condition '(attr=attributes[i++])!=nullptr' is > redundant or there is possible null pointer dereference: attr. > [src/amf/amfd/nodegroup.cc:224]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/nodegroup.cc:1407]: (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/ntf.cc:900] -> [src/amf/amfd/ntf.cc:904]: (style, > inconclusive) Variable 'rc' is reassigned a value before the old one has > been used if variable is no semaphore variable. > [src/amf/amfd/role.cc:865] > -> [src/amf/amfd/role.cc:874]: (style) Variable 'avnd' is reassigned a > value > before the old one has been used. [src/amf/amfd/role.cc:913] -> > [src/amf/amfd/role.cc:924]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfd/role.cc:699]: > (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/role.cc:713]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/role.cc:720]: (performance) Prefer > prefix > ++/-- operators for non-primitive types. [src/amf/amfd/role.cc:726]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/role.cc:733]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/role.cc:1134]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/role.cc:1285]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sg.cc:640]: (warning) Comparison of a boolean expression > with > an integer. [src/amf/amfd/sg.cc:640]: (warning) Comparison of a boolean > value using relational operator (<, >, <= or >=). > [src/amf/amfd/sg.cc:929]: > (style) Expression is always false because 'else if' condition matches > previous condition at line 922. [src/amf/amfd/sg.cc:394]: (style) > Condition > 'rc!=0' is always false [src/amf/amfd/sg.cc:42]: (style) The scope of > the > variable 'rc' can be reduced. [src/amf/amfd/sg.cc:1145]: (style) The > scope > of the variable 'su' can be reduced. [src/amf/amfd/sg.cc:2203]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sg_2n_fsm.cc:3968] -> [src/amf/amfd/sg_2n_fsm.cc:3969]: > (style) Variable 'a_susi' is reassigned a value before the old one has > been > used. [src/amf/amfd/sg_2n_fsm.cc:2789]: (style) The scope of the > variable > 'a_susi' can be reduced. [src/amf/amfd/sg_2n_fsm.cc:2790]: (style) The > scope > of the variable 'o_su' can be reduced. > [src/amf/amfd/sg_nored_fsm.cc:111]: > (style) The scope of the variable 'flag' can be reduced. > [src/amf/amfd/sg_npm_fsm.cc:2225] -> [src/amf/amfd/sg_npm_fsm.cc:2233]: > (style) Variable 'susi' is reassigned a value before the old one has > been > used. [src/amf/amfd/sg_npm_fsm.cc:1071]: (style) The scope of the > variable > 'l_flag' can be reduced. [src/amf/amfd/sg_npm_fsm.cc:1263]: (style) The > scope of the variable 'l_flag' can be reduced. > [src/amf/amfd/sg_npm_fsm.cc:1391]: (style) The scope of the variable > 'a_susi' can be reduced. [src/amf/amfd/sg_npm_fsm.cc:1557]: (style) The > scope of the variable 'flag' can be reduced. > [src/amf/amfd/sg_npm_fsm.cc:1557]: (style) The scope of the variable > 'fover_progress' can be reduced. [src/amf/amfd/sg_npm_fsm.cc:2460]: > (style) > The scope of the variable 'susi_assgn_failed' can be reduced. > [src/amf/amfd/sg_npm_fsm.cc:2831]: (style) The scope of the variable > 'o_susi' can be reduced. [src/amf/amfd/sg_npm_fsm.cc:3786]: (style) The > scope of the variable 'ot_susi' can be reduced. > [src/amf/amfd/sg_npm_fsm.cc:4064]: (style) The scope of the variable > 'o_su' > can be reduced. [src/amf/amfd/sg_npm_fsm.cc:4065]: (style) The scope of > the > variable 'o_susi' can be reduced. [src/amf/amfd/sg_npm_fsm.cc:4189]: > (style) > The scope of the variable 'rc' can be reduced. > [src/amf/amfd/sg_nway_fsm.cc:1139]: (warning) Assignment of function > parameter has no effect outside the function. Did you forget > dereferencing > it? [src/amf/amfd/sg_nway_fsm.cc:147] -> > [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. > [src/amf/amfd/sg_nway_fsm.cc:148] -> [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. > [src/amf/amfd/sg_nway_fsm.cc:640] -> [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. > [src/amf/amfd/sg_nway_fsm.cc:641] -> [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. > [src/amf/amfd/sg_nway_fsm.cc:666] -> [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. > [src/amf/amfd/sg_nway_fsm.cc:667] -> [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. > [src/amf/amfd/sg_nway_fsm.cc:350] -> [src/amf/amfd/sg_nway_fsm.cc:355]: > (style) Variable 't_susi' is reassigned a value before the old one has > been > used. [src/amf/amfd/sg_nway_fsm.cc:791] -> > [src/amf/amfd/sg_nway_fsm.cc:803]: (style) Variable 'susi' is > reassigned a > value before the old one has been used. > [src/amf/amfd/sg_nway_fsm.cc:1255] > -> [src/amf/amfd/sg_nway_fsm.cc:1257]: (style) Variable 'preferred_su' > is > reassigned a value before the old one has been used. > [src/amf/amfd/sg_nway_fsm.cc:2785] -> > [src/amf/amfd/sg_nway_fsm.cc:2786]: > (style) Variable 't_susi' is reassigned a value before the old one has > been > used. [src/amf/amfd/sg_nway_fsm.cc:2864] -> > [src/amf/amfd/sg_nway_fsm.cc:2872]: (style) Variable 't_susi' is > reassigned > a value before the old one has been used. > [src/amf/amfd/sg_nway_fsm.cc:3479]: (style) The scope of the variable > 'is_su_present' can be reduced. [src/amf/amfd/sg_nway_fsm.cc:1285]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sg_nway_fsm.cc:1410]: (performance) Prefer prefix ++/-- > operators for non-primitive types. [src/amf/amfd/sg_nwayact_fsm.cc:92]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sgproc.cc:663] -> [src/amf/amfd/sgproc.cc:664]: (style) > Variable 'node' is reassigned a value before the old one has been used. > [src/amf/amfd/sgproc.cc:672] -> [src/amf/amfd/sgproc.cc:673]: (style) > Variable 'node' is reassigned a value before the old one has been used. > [src/amf/amfd/sgproc.cc:1795] -> [src/amf/amfd/sgproc.cc:1796]: (style, > inconclusive) Variable 'su_rank' is reassigned a value before the old > one > has been used if variable is no semaphore variable. > [src/amf/amfd/sgproc.cc:1887]: (style) Variable 'num_su' is modified > but its > new value is never used. [src/amf/amfd/sgproc.cc:650]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sgproc.cc:1501]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/sgtype.cc:114] -> > [src/amf/amfd/sgtype.cc:109]: (warning, inconclusive) Either the > condition > '(attr=attributes[i++])!=nullptr' is redundant or there is possible null > pointer dereference: attr. [src/amf/amfd/sgtype.cc:187] -> > [src/amf/amfd/sgtype.cc:182]: (warning, inconclusive) Either the > condition > '(attr=attributes[i++])!=nullptr' is redundant or there is possible null > pointer dereference: attr. [src/amf/amfd/sgtype.cc:189] -> > [src/amf/amfd/sgtype.cc:182]: (warning, inconclusive) Either the > condition > '(attr=attributes[i++])!=nullptr' is redundant or there is possible null > pointer dereference: attr. [src/amf/amfd/sgtype.cc:252] -> > [src/amf/amfd/sgtype.cc:266]: (style, inconclusive) Variable 'error' is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfd/sgtype.cc:86]: (style) The scope of > the > variable 'sut' can be reduced. [src/amf/amfd/si.cc:165] -> > [src/amf/amfd/si.cc:172]: (style) Variable 'i_csi' is reassigned a value > before the old one has been used. [src/amf/amfd/si.cc:250] -> > [src/amf/amfd/si.cc:255]: (style) Variable 'prev_csi' is reassigned a > value > before the old one has been used. [src/amf/amfd/si.cc:249] -> > [src/amf/amfd/si.cc:256]: (style) Variable 'i_csi' is reassigned a value > before the old one has been used. [src/amf/amfd/si.cc:1110] -> > [src/amf/amfd/si.cc:1111]: (style) Variable 'no_of_sisus_to_delete' is > reassigned a value before the old one has been used. > [src/amf/amfd/si.cc:325]: (style) The scope of the variable 'temp' can > be > reduced. [src/amf/amfd/si.cc:385]: (style) The scope of the variable > 'rc' > can be reduced. [src/amf/amfd/si.cc:1490]: (performance) Prefer prefix > ++/-- > operators for non-primitive types. [src/amf/amfd/si_dep.cc:301] -> > [src/amf/amfd/si_dep.cc:308]: (style) Variable 'dep_si' is reassigned a > value before the old one has been used. [src/amf/amfd/si_dep.cc:302] -> > [src/amf/amfd/si_dep.cc:314]: (style) Variable 'spons_si_node' is > reassigned > a value before the old one has been used. [src/amf/amfd/si_dep.cc:442] > -> > [src/amf/amfd/si_dep.cc:447]: (style) Variable 'susi' is reassigned a > value > before the old one has been used. [src/amf/amfd/si_dep.cc:532] -> > [src/amf/amfd/si_dep.cc:537]: (style) Variable 'evt' is reassigned a > value > before the old one has been used. [src/amf/amfd/si_dep.cc:598] -> > [src/amf/amfd/si_dep.cc:605]: (style) Variable 'si' is reassigned a > value > before the old one has been used. [src/amf/amfd/si_dep.cc:599] -> > [src/amf/amfd/si_dep.cc:606]: (style) Variable 'spons_si' is reassigned > a > value before the old one has been used. [src/amf/amfd/si_dep.cc:856] -> > [src/amf/amfd/si_dep.cc:860]: (style) Variable 'si' is reassigned a > value > before the old one has been used. [src/amf/amfd/si_dep.cc:915] -> > [src/amf/amfd/si_dep.cc:919]: (style) Variable 'spons_si' is reassigned > a > value before the old one has been used. [src/amf/amfd/si_dep.cc:1617] -> > [src/amf/amfd/si_dep.cc:1621]: (style) Variable 'assignmemt_status' is > reassigned a value before the old one has been used. > [src/amf/amfd/si_dep.cc:978]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/si_dep.cc:1023]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/si_dep.cc:1075]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/si_dep.cc:1470]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/si_dep.cc:1799]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/si_dep.cc:2058]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/si_dep.cc:2130]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/si_dep.cc:2194]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/si_dep.cc:2270]: (performance) Prefer prefix ++/-- > operators > for non-primitive types. [src/amf/amfd/si_dep.cc:2524]: (performance) > Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/siass.cc:1077] > -> [src/amf/amfd/siass.cc:1082]: (style) Variable 'node' is reassigned a > value before the old one has been used. [src/amf/amfd/siass.cc:452]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/siass.cc:473]: (performance) Prefer prefix ++/-- > operators for > non-primitive types. [src/amf/amfd/siass.cc:1042]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sirankedsu.cc:45] -> [src/amf/amfd/sirankedsu.cc:51]: > (style) > Variable 'avd_si' is reassigned a value before the old one has been > used. > [src/amf/amfd/sirankedsu.cc:107] -> [src/amf/amfd/sirankedsu.cc:113]: > (style) Variable 'ranked_su_per_si' is reassigned a value before the > old one > has been used. [src/amf/amfd/sirankedsu.cc:163] -> > [src/amf/amfd/sirankedsu.cc:176]: (style) Variable > 'avd_sus_per_si_rank' is > reassigned a value before the old one has been used. > [src/amf/amfd/sirankedsu.cc:235] -> [src/amf/amfd/sirankedsu.cc:245]: > (style) Variable 'avd_si' is reassigned a value before the old one has > been > used. [src/amf/amfd/sirankedsu.cc:354]: (performance) Prefer prefix > ++/-- > operators for non-primitive types. [src/amf/amfd/su.cc:1347] -> > [src/amf/amfd/su.cc:1348]: (style, inconclusive) Variable 'rc' is > reassigned > a value before the old one has been used if variable is no semaphore > variable. [src/amf/amfd/su.cc:518]: (performance) Prefer prefix ++/-- > operators for non-primitive types. [src/amf/amfd/su.cc:1948]: > (performance) > Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/sutype.cc:103]: (style) Condition 'rc!=0' is always false > [src/amf/amfd/sutype.cc:86] -> [src/amf/amfd/sutype.cc:81]: (warning, > inconclusive) Either the condition '(attr=attributes[i++])!=nullptr' is > redundant or there is possible null pointer dereference: attr. > [src/amf/amfd/sutype.cc:88] -> [src/amf/amfd/sutype.cc:81]: (warning, > inconclusive) Either the condition '(attr=attributes[i++])!=nullptr' is > redundant or there is possible null pointer dereference: attr. > [src/amf/amfd/util.cc:2022]: (warning) Possible null pointer > dereference: > avnd [src/amf/amfd/util.cc:1272] -> [src/amf/amfd/util.cc:1278]: (style) > Variable 'd2n_msg' is reassigned a value before the old one has been > used. > [src/amf/amfd/util.cc:1566] -> [src/amf/amfd/util.cc:1581]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfd/util.cc:2078]: (style) Consecutive return, break, > continue, > goto or throw statements are unnecessary. [src/amf/amfd/util.cc:1032]: > (style) The scope of the variable 'i' can be reduced. > [src/amf/amfd/util.cc:533]: (performance) Prefer prefix ++/-- operators > for > non-primitive types. [src/amf/amfd/util.cc:541]: (performance) Prefer > prefix > ++/-- operators for non-primitive types. [src/amf/amfd/util.cc:1392]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/util.cc:1408]: (performance) Prefer prefix ++/-- > operators for > non-primitive types. [src/amf/amfd/util.cc:1419]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/util.cc:1446]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/util.cc:1465]: (performance) Prefer prefix ++/-- > operators for > non-primitive types. [src/amf/amfd/util.cc:1482]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/util.cc:1510]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfd/util.cc:1526]: (performance) Prefer prefix ++/-- > operators for > non-primitive types. [src/amf/amfd/util.cc:1542]: (performance) Prefer > prefix ++/-- operators for non-primitive types. > [src/amf/amfd/tests/test_amfdb.cc:29]: (style) The function 'SetUp' is > never > used. [src/amf/amfd/tests/test_amfdb.cc:33]: (style) The function > 'TearDown' > is never used. [src/amf/amfd/mds.cc:534]: (style) The function > 'avd_avnd_mds_send' is never used. [src/amf/amfd/ndmsg.cc:177]: (style) > The > function 'avd_mds_dec_flat' is never used. [src/amf/amfd/ndmsg.cc:90]: > (style) The function 'avd_mds_enc_flat' is never used. > [src/amf/amfd/ndfsm.cc:1000]: (style) The function 'avd_node_down' is > never > used. [src/amf/amfd/ntf.cc:130]: (style) The function > 'avd_send_cluster_reset_alarm' is never used. [src/amf/amfd/ntf.cc:367]: > (style) The function 'avd_send_su_ha_readiness_state_chg_ntf' is never > used. > [src/amf/amfd/util.cc:296]: (style) The function > 'avd_snd_oper_state_msg' is > never used. [src/amf/amfd/chkop.cc:132]: (style) The function > 'avsv_mbcsv_deregister' is never used. [src/amf/amfd/chkop.cc:1147]: > (style) > The function 'avsv_mbcsv_obj_set' is never used. > [src/amf/amfd/chkop.cc:865]: (style) The function 'avsv_send_ckpt_data' > is > never used. [src/amf/amfd/node.cc:35]: (style) The function 'operator<' > is > never used. > > changeset 7210d425928be36decd482c0f964360e80201cfc > Author: A V Mahesh <[email protected]> > Date: Mon, 20 Mar 2017 10:35:30 +0530 > > amfnd: Fix all Cppcheck 1.77 issues [#2341] V3 > > V3 fixed review comments. > > [src/amf/amfnd/amfnd.cc:58] -> [src/amf/amfnd/amfnd.cc:63]: (style) > Variable > 'del_cbk' is reassigned a value before the old one has been used. > [src/amf/amfnd/amfnd.cc:59] -> [src/amf/amfnd/amfnd.cc:65]: (style) > Variable > 'o_comp' is reassigned a value before the old one has been used. > [src/amf/amfnd/amfnd.cc:191] -> [src/amf/amfnd/amfnd.cc:199]: (style) > Variable 'o_comp' is reassigned a value before the old one has been > used. > [src/amf/amfnd/amfnd.cc:249] -> [src/amf/amfnd/amfnd.cc:250]: (style) > Variable 'res' is reassigned a value before the old one has been used. > [src/amf/amfnd/cbq.cc:441] -> [src/amf/amfnd/cbq.cc:442]: (style) > Variable > 'temp_csi' is reassigned a value before the old one has been used. > [src/amf/amfnd/cbq.cc:734] -> [src/amf/amfnd/cbq.cc:748]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/cbq.cc:1132] -> [src/amf/amfnd/cbq.cc:1133]: (style) > Variable > 'temp_csi' is reassigned a value before the old one has been used. > [src/amf/amfnd/chc.cc:842]: (style) The scope of the variable 'cbk_rec' > can > be reduced. [src/amf/amfnd/clc.cc:1402] -> [src/amf/amfnd/clc.cc:1408]: > (warning, inconclusive) Either the condition > 'NCSCC_RC_SUCCESS!=rc&&curr_rec' is redundant or there is possible null > pointer dereference: curr_rec. [src/amf/amfnd/clc.cc:1403] -> > [src/amf/amfnd/clc.cc:1408]: (warning, inconclusive) Either the > condition > 'NCSCC_RC_SUCCESS!=rc&&curr_rec' is redundant or there is possible null > pointer dereference: curr_rec. [src/amf/amfnd/clc.cc:1404] -> > [src/amf/amfnd/clc.cc:1408]: (warning, inconclusive) Either the > condition > 'NCSCC_RC_SUCCESS!=rc&&curr_rec' is redundant or there is possible null > pointer dereference: curr_rec. [src/amf/amfnd/clc.cc:610] -> > [src/amf/amfnd/clc.cc:616]: (style) Variable 'clc_evt' is reassigned a > value > before the old one has been used. [src/amf/amfnd/clc.cc:1708] -> > [src/amf/amfnd/clc.cc:1712]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/clc.cc:1749] -> > [src/amf/amfnd/clc.cc:1753]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/clc.cc:1951] -> > [src/amf/amfnd/clc.cc:1955]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/clc.cc:2370] -> > [src/amf/amfnd/clc.cc:2376]: (style) Variable 'csi' is reassigned a > value > before the old one has been used. [src/amf/amfnd/clc.cc:3052] -> > [src/amf/amfnd/clc.cc:3053]: (style) Variable 'tmp' is reassigned a > value > before the old one has been used. [src/amf/amfnd/clc.cc:3172] -> > [src/amf/amfnd/clc.cc:3181]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/clc.cc:1356]: (style) > The > scope of the variable 'curr_rec' can be reduced. > [src/amf/amfnd/clc.cc:1384]: (style) The scope of the variable > 'curr_rec' > can be reduced. [src/amf/amfnd/clc.cc:3042]: (style) The scope of the > variable 'i' can be reduced. [src/amf/amfnd/comp.cc:2557] -> > [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. [src/amf/amfnd/comp.cc:2237] -> > [src/amf/amfnd/comp.cc:2250]: (style) Variable 'rc' is reassigned a > value > before the old one has been used. [src/amf/amfnd/comp.cc:2962] -> > [src/amf/amfnd/comp.cc:2972]: (style) Variable 'rc' is reassigned a > value > before the old one has been used. [src/amf/amfnd/compdb.cc:485]: > (warning) > Comparison of a boolean expression with an integer. > [src/amf/amfnd/compdb.cc:486]: (warning) Comparison of a boolean > expression > with an integer. [src/amf/amfnd/compdb.cc:485]: (warning) Comparison of > a > boolean value using relational operator (<, >, <= or >=). > [src/amf/amfnd/compdb.cc:732] -> [src/amf/amfnd/compdb.cc:734]: > (warning) > Either the condition '!compt' is redundant or there is possible null > pointer > dereference: compt. [src/amf/amfnd/compdb.cc:126] -> > [src/amf/amfnd/compdb.cc:134]: (style, inconclusive) Variable 'rc' is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfnd/compdb.cc:718] -> > [src/amf/amfnd/compdb.cc:721]: (style) Variable 'rc' is reassigned a > value > before the old one has been used. [src/amf/amfnd/compdb.cc:1378]: > (style) > The scope of the variable 'env_counter' can be reduced. > [src/amf/amfnd/cpm.cc:150]: (warning) Assignment of function parameter > has > no effect outside the function. Did you forget dereferencing it? > [src/amf/amfnd/cpm.cc:105] -> [src/amf/amfnd/cpm.cc:111]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/cpm.cc:141] -> [src/amf/amfnd/cpm.cc:146]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/cpm.cc:331] -> [src/amf/amfnd/cpm.cc:346]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/di.cc:1041] -> [src/amf/amfnd/di.cc:1044]: (warning) > Either > the condition '!msg' is redundant or there is possible null pointer > dereference: msg. [src/amf/amfnd/di.cc:1352]: (warning) Possible null > pointer dereference: pending_rec [src/amf/amfnd/di.cc:999] -> > [src/amf/amfnd/di.cc:1015]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/di.cc:1391] -> > [src/amf/amfnd/di.cc:1397]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/di.cc:1507] -> > [src/amf/amfnd/di.cc:1514]: (style) Variable 'info' is reassigned a > value > before the old one has been used. [src/amf/amfnd/di.cc:1578]: (style) > The > scope of the variable 'pg' can be reduced. [src/amf/amfnd/err.cc:387] -> > [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_INSTANTI > ATIONFAILED(comp)||m_AVND_COMP_PRES_STATE_IS_TERMINATIONFAILED(comp)))' > is > redundant or there is possible null pointer dereference: comp. > [src/amf/amfnd/err.cc:400] -> [src/amf/amfnd/err.cc:410]: (warning) > Either > the condition > 'if(comp&&(m_AVND_COMP_PRES_STATE_IS_UNINSTANTIATED(comp)||m_A > > VND_COMP_PRES_STATE_IS_INSTANTIATIONFAILED(comp)||m_AVND_COMP_PRES_STATE_IS_ > TERMINATIONFAILED(comp)))' is redundant or there is possible null > pointer > dereference: comp. [src/amf/amfnd/err.cc:314] -> > [src/amf/amfnd/err.cc:321]: > (style) Variable 'rc' is reassigned a value before the old one has been > used. [src/amf/amfnd/err.cc:667] -> [src/amf/amfnd/err.cc:673]: (style) > Variable 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/err.cc:695] -> [src/amf/amfnd/err.cc:706]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/err.cc:801] -> [src/amf/amfnd/err.cc:811]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/err.cc:938] -> [src/amf/amfnd/err.cc:949]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/err.cc:1589] -> [src/amf/amfnd/err.cc:1598]: (style) > Variable > 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/evt.cc:368] -> [src/amf/amfnd/evt.cc:373]: (style) > Variable > 'ha_state_event' is reassigned a value before the old one has been used. > [src/amf/amfnd/hcdb.cc:73] -> [src/amf/amfnd/hcdb.cc:75]: (style) > Variable > 'hc' is reassigned a value before the old one has been used. > [src/amf/amfnd/hcdb.cc:104] -> [src/amf/amfnd/hcdb.cc:113]: (style, > inconclusive) Variable 'error' is reassigned a value before the old one > has > been used if variable is no semaphore variable. > [src/amf/amfnd/hcdb.cc:188] > -> [src/amf/amfnd/hcdb.cc:201]: (style, inconclusive) Variable 'error' > is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfnd/hcdb.cc:444] -> > [src/amf/amfnd/hcdb.cc:447]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/imm.cc:137] -> > [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. [src/amf/amfnd/imm.cc:38] -> > [src/amf/amfnd/imm.cc:44]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/main.cc:365] -> > [src/amf/amfnd/main.cc:369]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/main.cc:405] -> > [src/amf/amfnd/main.cc:412]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/main.cc:716] -> > [src/amf/amfnd/main.cc:733]: (style, inconclusive) Variable 'rc' is > reassigned a value before the old one has been used if variable is no > semaphore variable. [src/amf/amfnd/main.cc:507]: (style) The scope of > the > variable 'retry_cnt' can be reduced. [src/amf/amfnd/main.cc:606]: > (style) > Obsolescent function 'usleep' called. It is recommended to use > 'nanosleep' > or 'setitimer' instead. [src/amf/amfnd/mds.cc:104] -> > [src/amf/amfnd/mds.cc:107]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/mds.cc:875] -> > [src/amf/amfnd/mds.cc:882]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/mds.cc:1549] -> > [src/amf/amfnd/mds.cc:1556]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/mds.cc:1587] -> > [src/amf/amfnd/mds.cc:1599]: (style) Variable 'send_info' is reassigned > a > value before the old one has been used. [src/amf/amfnd/mds.cc:1588] -> > [src/amf/amfnd/mds.cc:1600]: (style) Variable 'send' is reassigned a > value > before the old one has been used. [src/amf/amfnd/pg.cc:700] -> > [src/amf/amfnd/pg.cc:704]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/pg.cc:834] -> > [src/amf/amfnd/pg.cc:848]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/pg.cc:66]: (style) The > scope of the variable 'i' can be reduced. [src/amf/amfnd/pg.cc:301]: > (style) > The scope of the variable 'i' can be reduced. [src/amf/amfnd/pg.cc:302]: > (style) The scope of the variable 'pg_mem' can be reduced. > [src/amf/amfnd/pg.cc:400]: (style) The scope of the variable 'pg' can be > reduced. [src/amf/amfnd/pg.cc:473]: (style) The scope of the variable > 'chg_mem' can be reduced. [src/amf/amfnd/pg.cc:566]: (style) The scope > of > the variable 'curr' can be reduced. [src/amf/amfnd/pg.cc:738]: (style) > The > scope of the variable 'i' can be reduced. [src/amf/amfnd/pg.cc:582]: > (performance) Prefer prefix ++/-- operators for non-primitive types. > [src/amf/amfnd/proxy.cc:129] -> [src/amf/amfnd/proxy.cc:136]: (warning, > inconclusive) Either the condition '(NCSCC_RC_SUCCESS!=rc)&&rec' is > redundant or there is possible null pointer dereference: rec. > [src/amf/amfnd/proxy.cc:130] -> [src/amf/amfnd/proxy.cc:136]: (warning, > inconclusive) Either the condition '(NCSCC_RC_SUCCESS!=rc)&&rec' is > redundant or there is possible null pointer dereference: rec. > [src/amf/amfnd/proxy.cc:131] -> [src/amf/amfnd/proxy.cc:136]: (warning, > inconclusive) Either the condition '(NCSCC_RC_SUCCESS!=rc)&&rec' is > redundant or there is possible null pointer dereference: rec. > [src/amf/amfnd/proxy.cc:132] -> [src/amf/amfnd/proxy.cc:136]: (warning, > inconclusive) Either the condition '(NCSCC_RC_SUCCESS!=rc)&&rec' is > redundant or there is possible null pointer dereference: rec. > [src/amf/amfnd/proxy.cc:332] -> [src/amf/amfnd/proxy.cc:345]: (style) > Variable 'nd_nd_ava_msg' is reassigned a value before the old one has > been > used. [src/amf/amfnd/proxy.cc:646] -> [src/amf/amfnd/proxy.cc:667]: > (style) > Variable 'rc' is reassigned a value before the old one has been used. > [src/amf/amfnd/proxydb.cc:266] -> [src/amf/amfnd/proxydb.cc:269]: > (warning) > Either the condition 'if(comp)' is redundant or there is possible null > pointer dereference: comp. [src/amf/amfnd/proxydb.cc:45] -> > [src/amf/amfnd/proxydb.cc:51]: (style) Variable 'rec' is reassigned a > value > before the old one has been used. [src/amf/amfnd/proxydb.cc:92] -> > [src/amf/amfnd/proxydb.cc:98]: (style) Variable 'rec' is reassigned a > value > before the old one has been used. [src/amf/amfnd/proxydb.cc:126] -> > [src/amf/amfnd/proxydb.cc:128]: (style) Variable 'rec' is reassigned a > value > before the old one has been used. [src/amf/amfnd/sidb.cc:851] -> > [src/amf/amfnd/sidb.cc:857]: (style) Variable 'rc' is reassigned a value > before the old one has been used. [src/amf/amfnd/su.cc:1005] -> > [src/amf/amfnd/su.cc:1012]: (style) Variable 'comp' is reassigned a > value > before the old one has been used. [src/amf/amfnd/sudb.cc:168] -> > [src/amf/amfnd/sudb.cc:167]: (warning) Either the condition '!su' is > redundant or there is possible null pointer dereference: su. > [src/amf/amfnd/susm.cc:544]: (warning) Comparison of a boolean > expression > with an integer. [src/amf/amfnd/susm.cc:3780] -> > [src/amf/amfnd/susm.cc:3770]: (warning) Either the condition 'csi' is > redundant or there is possible null pointer dereference: csi. > [src/amf/amfnd/susm.cc:959]: (style) The scope of the variable > 'are_si_assigned' can be reduced. [src/amf/amfnd/susm.cc:1556]: (style) > The > scope of the variable 'is_en' can be reduced. > [src/amf/amfnd/susm.cc:2714]: > (style) The scope of the variable 'is' can be reduced. > [src/amf/amfnd/util.cc:191]: (style) The scope of the variable 'str' > can be > reduced. [src/amf/amfnd/sudb.cc:298]: (style) The function > 'sudb_rec_comp_add' is never used. > > changeset 582d9eb51f7108d6bd994486fe18f7a117e40620 > Author: A V Mahesh <[email protected]> > Date: Mon, 20 Mar 2017 10:38:40 +0530 > > amfa: Fix all Cppcheck 1.77 issues [#2341] V3 > > V3 fixed review commets > > [src/amf/agent/ava_hdl.cc:59] -> [src/amf/agent/ava_hdl.cc:67]: (style) > Variable 'rc' is reassigned a value before the old one has been used. > [src/amf/agent/ava_hdl.cc:420]: (style) The scope of the variable 'rec' > can > be reduced. [src/amf/agent/ava_hdl.cc:592]: (style) The scope of the > variable 'i' can be reduced. [src/amf/agent/ava_mds.cc:86] -> > [src/amf/agent/ava_mds.cc:90]: (style) Variable 'rc' is reassigned a > value > before the old one has been used. [src/amf/agent/ava_mds.cc:149] -> > [src/amf/agent/ava_mds.cc:158]: (style) Variable 'rc' is reassigned a > value > before the old one has been used. [src/amf/agent/ava_mds.cc:1020] -> > [src/amf/agent/ava_mds.cc:1028]: (style) Variable 'rc' is reassigned a > value > before the old one has been used. [src/amf/agent/ava_mds.cc:1103] -> > [src/amf/agent/ava_mds.cc:1107]: (style) Variable 'msg' is reassigned a > value before the old one has been used. [src/amf/agent/ava_op.cc:221] -> > [src/amf/agent/ava_op.cc:222]: (style) Variable > 'osaf_cbk.saAmfContainedComponentInstantiateCallback' is reassigned a > value > before the old one has been used. [src/amf/agent/ava_op.cc:240] -> > [src/amf/agent/ava_op.cc:241]: (style) Variable > 'osaf_cbk.saAmfContainedComponentInstantiateCallback' is reassigned a > value > before the old one has been used. [src/amf/agent/ava_op.cc:241] -> > [src/amf/agent/ava_op.cc:242]: (style) Variable > 'osaf_cbk.saAmfContainedComponentInstantiateCallback' is reassigned a > value > before the old one has been used. [src/amf/agent/ava_op.cc:120]: > (style) The > scope of the variable 'cb' can be reduced. > > > Complete diffstat: > ------------------ > src/amf/agent/ava_hdl.cc | 14 ++++++-------- > src/amf/agent/ava_mds.cc | 13 +++++-------- > src/amf/agent/ava_op.cc | 12 +++++------- > src/amf/amfd/app.cc | 4 ++-- > src/amf/amfd/apptype.cc | 21 ++++++++------------- > src/amf/amfd/chkop.cc | 3 +-- > src/amf/amfd/ckpt_dec.cc | 15 ++++++--------- > src/amf/amfd/ckpt_edu.cc | 4 ++-- > src/amf/amfd/ckpt_enc.cc | 60 > ++++++++++++++++++++++++------------------------------------ > src/amf/amfd/clm.cc | 12 +++++------- > src/amf/amfd/cluster.cc | 17 +++++++---------- > src/amf/amfd/comp.cc | 11 ++++------- > src/amf/amfd/compcstype.cc | 8 +++----- > src/amf/amfd/comptype.cc | 3 +-- > src/amf/amfd/csi.cc | 27 +++++++++++---------------- > src/amf/amfd/csiattr.cc | 10 ++++------ > src/amf/amfd/ctcstype.cc | 11 ++--------- > src/amf/amfd/dmsg.cc | 5 ++--- > src/amf/amfd/hlttype.cc | 4 ++-- > src/amf/amfd/imm.cc | 56 > +++++++++++++++++++++----------------------------------- > src/amf/amfd/main.cc | 19 +++++-------------- > src/amf/amfd/mds.cc | 5 ++--- > src/amf/amfd/ndfsm.cc | 36 +++++++++++++++--------------------- > src/amf/amfd/ndproc.cc | 16 ++++++---------- > src/amf/amfd/node.cc | 25 ++++++++++--------------- > src/amf/amfd/nodegroup.cc | 16 ++++++++-------- > src/amf/amfd/ntf.cc | 4 ++-- > src/amf/amfd/role.cc | 43 > +++++++++++++++++-------------------------- > src/amf/amfd/sg.cc | 23 +++++------------------ > src/amf/amfd/sg_2n_fsm.cc | 10 +++++----- > src/amf/amfd/sg_nored_fsm.cc | 4 ++-- > src/amf/amfd/sg_npm_fsm.cc | 33 +++++++++++++-------------------- > src/amf/amfd/sg_nway_fsm.cc | 40 > +++++++++++++++------------------------- > src/amf/amfd/sg_nwayact_fsm.cc | 6 +++--- > src/amf/amfd/sgproc.cc | 19 ++++++------------- > src/amf/amfd/sgtype.cc | 115 > ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------- > src/amf/amfd/si.cc | 24 ++++++++---------------- > src/amf/amfd/si_dep.cc | 80 > +++++++++++++++++++++++++++++--------------------------------------------------- > src/amf/amfd/siass.cc | 19 ++++++++----------- > src/amf/amfd/sirankedsu.cc | 18 +++++++----------- > src/amf/amfd/su.cc | 11 ++++------- > src/amf/amfd/sutype.cc | 43 > ++++++++++++++++++++----------------------- > src/amf/amfd/util.cc | 69 > ++++++++++++++++++++++++++------------------------------------------- > src/amf/amfnd/amfnd.cc | 16 ++++++++++------ > src/amf/amfnd/cbq.cc | 10 ++++------ > src/amf/amfnd/chc.cc | 30 ++++++++++++++++-------------- > src/amf/amfnd/clc.cc | 38 +++++++++++++++----------------------- > src/amf/amfnd/comp.cc | 9 ++++----- > src/amf/amfnd/compdb.cc | 18 +++++++++--------- > src/amf/amfnd/cpm.cc | 13 +++++-------- > src/amf/amfnd/di.cc | 36 ++++++++++++++++++------------------ > src/amf/amfnd/err.cc | 35 ++++++++++++++--------------------- > src/amf/amfnd/evt.cc | 4 ++-- > src/amf/amfnd/hcdb.cc | 14 ++++---------- > src/amf/amfnd/imm.cc | 6 +++--- > src/amf/amfnd/main.cc | 14 ++++++-------- > src/amf/amfnd/mds.cc | 21 ++++++++------------- > src/amf/amfnd/pg.cc | 34 ++++++++++++++++------------------ > src/amf/amfnd/proxy.cc | 9 ++++----- > src/amf/amfnd/proxydb.cc | 18 ++++++------------ > src/amf/amfnd/sidb.cc | 4 ++-- > src/amf/amfnd/su.cc | 4 ++-- > src/amf/amfnd/sudb.cc | 6 +++--- > src/amf/amfnd/susm.cc | 20 ++++++++++---------- > src/amf/amfnd/util.cc | 3 ++- > src/amf/amfwd/amf_wdog.c | 3 ++- > src/amf/common/d2nmsg.c | 8 +++----- > src/amf/common/n2avamsg.c | 2 +- > src/amf/tools/amf_pm.c | 5 ++--- > 69 files changed, 566 insertions(+), 802 deletions(-) > > > Testing Commands: > ----------------- > AMF Functionality should work as it is. > > > Testing, Expected 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. > > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Opensaf-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Opensaf-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensaf-devel
