---

** [tickets:#2334] clm: Fix all Cppcheck 1.77 issue **

**Status:** accepted
**Milestone:** next
**Created:** Fri Mar 03, 2017 04:09 AM UTC by A V Mahesh (AVM)
**Last Updated:** Fri Mar 03, 2017 04:09 AM UTC
**Owner:** A V Mahesh (AVM)


[staging/src/clm/clmd/clms_evt.c:602] -> [staging/src/clm/clmd/clms_evt.c:545]: 
(warning) Either the condition 'node!=NULL' is redundant or there is possible 
null pointer dereference: node.
[staging/src/clm/clmd/clms_evt.c:603] -> [staging/src/clm/clmd/clms_evt.c:545]: 
(warning) Either the condition 'node!=NULL' is redundant or there is possible 
null pointer dereference: node.
[staging/src/clm/clmd/clms_evt.c:618]: (warning) Possible null pointer 
dereference: ip
[staging/src/clm/clmd/clms_evt.c:101] -> [staging/src/clm/clmd/clms_evt.c:104]: 
(style) Variable 'clma_down_rec' is reassigned a value before the old one has 
been used.
[staging/src/clm/clmd/clms_evt.c:177] -> [staging/src/clm/clmd/clms_evt.c:182]: 
(style) Variable 'client' is reassigned a value before the old one has been 
used.
[staging/src/clm/clmd/clms_evt.c:188] -> [staging/src/clm/clmd/clms_evt.c:191]: 
(style) Variable 'rc' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:504] -> [staging/src/clm/clmd/clms_evt.c:521]: 
(style) Variable 'node' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:678] -> [staging/src/clm/clmd/clms_evt.c:683]: 
(style) Variable 'node_name' is reassigned a value before the old one has been 
used.
[staging/src/clm/clmd/clms_evt.c:679] -> [staging/src/clm/clmd/clms_evt.c:684]: 
(style) Variable 'op_node' is reassigned a value before the old one has been 
used.
[staging/src/clm/clmd/clms_evt.c:677] -> [staging/src/clm/clmd/clms_evt.c:687]: 
(style) Variable 'rc' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:873] -> [staging/src/clm/clmd/clms_evt.c:877]: 
(style) Variable 'node' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:1039] -> 
[staging/src/clm/clmd/clms_evt.c:1048]: (style) Variable 'op_node' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:1134] -> 
[staging/src/clm/clmd/clms_evt.c:1142]: (style) Variable 'node' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:1236] -> 
[staging/src/clm/clmd/clms_evt.c:1240]: (style) Variable 'node' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:2028] -> 
[staging/src/clm/clmd/clms_evt.c:2036]: (style) Variable 'mds_rc' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_evt.c:2046] -> 
[staging/src/clm/clmd/clms_evt.c:2052]: (style) Variable 'node_down_rec' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:178] -> [staging/src/clm/clmd/clms_imm.c:184]: 
(style) Variable 'node' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:275] -> [staging/src/clm/clmd/clms_imm.c:295]: 
(style) Variable 'rc' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:335] -> [staging/src/clm/clmd/clms_imm.c:352]: 
(style) Variable 'rc' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:690] -> [staging/src/clm/clmd/clms_imm.c:693]: 
(style) Variable 'node' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:993] -> [staging/src/clm/clmd/clms_imm.c:996]: 
(style) Variable 'trk' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:1721] -> 
[staging/src/clm/clmd/clms_imm.c:1726]: (style) Variable 'node' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:1998] -> 
[staging/src/clm/clmd/clms_imm.c:2004]: (style) Variable 'node' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_imm.c:1527]: (style) The scope of the variable 'i' 
can be reduced.
[staging/src/clm/clmd/clms_imm.c:1528]: (style) The scope of the variable 
'attrMod' can be reduced.
[staging/src/clm/clmd/clms_imm.c:1529]: (style) The scope of the variable 
'name' can be reduced.
[staging/src/clm/clmd/clms_imm.c:557]: (style) Variable 'attr_Mod' is assigned 
a value that is never used.
[staging/src/clm/clmd/clms_imm.c:649]: (style) Variable 'attr_Mod' is assigned 
a value that is never used.
[staging/src/clm/clmd/clms_imm.c:829]: (style) Variable 'attr_Mod' is assigned 
a value that is never used.
[staging/src/clm/clmd/clms_main.c:329]: (style) Suspicious condition 
(assignment + comparison); Clarify expression with parentheses.
[staging/src/clm/clmd/clms_main.c:87] -> [staging/src/clm/clmd/clms_main.c:91]: 
(style) Variable 'evt' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_main.c:147]: (warning) fscanf() without field width 
limits can crash with huge input data.
[staging/src/clm/clmd/clms_mbcsv.c:591]: (style) Suspicious condition 
(assignment + comparison); Clarify expression with parentheses.
[staging/src/clm/clmd/clms_mbcsv.c:133] -> 
[staging/src/clm/clmd/clms_mbcsv.c:137]: (style) Variable 'client' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:261] -> 
[staging/src/clm/clmd/clms_mbcsv.c:266]: (style) Variable 'node' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:350] -> 
[staging/src/clm/clmd/clms_mbcsv.c:354]: (style) Variable 'node' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:417] -> 
[staging/src/clm/clmd/clms_mbcsv.c:419]: (style) Variable 'node' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:459] -> 
[staging/src/clm/clmd/clms_mbcsv.c:464]: (style) Variable 'node' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:899] -> 
[staging/src/clm/clmd/clms_mbcsv.c:908]: (style) Variable 'rc' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:935] -> 
[staging/src/clm/clmd/clms_mbcsv.c:939]: (style) Variable 'rc' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:1016] -> 
[staging/src/clm/clmd/clms_mbcsv.c:1021]: (style) Variable 'node' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:1173] -> 
[staging/src/clm/clmd/clms_mbcsv.c:1175]: (style) Variable 'pheader' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:1226] -> 
[staging/src/clm/clmd/clms_mbcsv.c:1243]: (style) Variable 'data' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:2052] -> 
[staging/src/clm/clmd/clms_mbcsv.c:2063]: (style) Variable 'data' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:2173] -> 
[staging/src/clm/clmd/clms_mbcsv.c:2188]: (style) Variable 'ckpt_msg' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:2174] -> 
[staging/src/clm/clmd/clms_mbcsv.c:2191]: (style) Variable 'hdr' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_mbcsv.c:2733] -> 
[staging/src/clm/clmd/clms_mbcsv.c:2741]: (style) Variable 'rc' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_mds.c:289] -> [staging/src/clm/clmd/clms_mds.c:292]: 
(style) Variable 'p8' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_mds.c:939] -> [staging/src/clm/clmd/clms_mds.c:945]: 
(style) Variable 'rc' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_mds.c:1070] -> 
[staging/src/clm/clmd/clms_mds.c:1081]: (style) Variable 'rc' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_plm.c:282] -> [staging/src/clm/clmd/clms_plm.c:292]: 
(style) Variable 'rc' is reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:36] -> [staging/src/clm/clmd/clms_util.c:40]: 
(style) Variable 'clms_node' is reassigned a value before the old one has been 
used.
[staging/src/clm/clmd/clms_util.c:87] -> [staging/src/clm/clmd/clms_util.c:91]: 
(style) Variable 'clms_node' is reassigned a value before the old one has been 
used.
[staging/src/clm/clmd/clms_util.c:113] -> 
[staging/src/clm/clmd/clms_util.c:116]: (style) Variable 'node' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:571] -> 
[staging/src/clm/clmd/clms_util.c:576]: (style) Variable 'trkrec' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:737] -> 
[staging/src/clm/clmd/clms_util.c:741]: (style) Variable 'rc' is reassigned a 
value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:817] -> 
[staging/src/clm/clmd/clms_util.c:822]: (style) Variable 'rem_reb' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:1035] -> 
[staging/src/clm/clmd/clms_util.c:1037]: (style) Variable 'client' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:1148] -> 
[staging/src/clm/clmd/clms_util.c:1155]: (style) Variable 'client' is 
reassigned a value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:293]: (style) The scope of the variable 
'tmpstr' can be reduced.
[staging/src/clm/clmd/clms_util.c:950]: (style) The scope of the variable 
'async_rc' can be reduced.
[staging/src/clm/clmd/clms_util.c:974]: (style) The scope of the variable 
'async_rc' can be reduced.
[staging/src/clm/clmd/clms_util.c:1010]: (style) The scope of the variable 
'async_rc' can be reduced.
[staging/src/clm/clmd/clms_util.c:664] -> 
[staging/src/clm/clmd/clms_util.c:668]: (style) Variable 'client' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_util.c:778] -> 
[staging/src/clm/clmd/clms_util.c:781]: (style) Variable 'ais_er' is reassigned 
a value before the old one has been used.
[staging/src/clm/clmd/clms_main.c:601]: (style) The function 'clms_cb_dump' is 
never used.



[staging/src/clm/agent/clma_api.c:125]: (style) Redundant condition: buf. '!buf 
|| (buf && !buf.notification)' is equivalent to '!buf || !buf.notification'
[staging/src/clm/agent/clma_api.c:168]: (style) Redundant condition: buf. '!buf 
|| (buf && !buf.notification)' is equivalent to '!buf || !buf.notification'
[staging/src/clm/agent/clma_mds.c:1272] -> 
[staging/src/clm/agent/clma_mds.c:1292]: (style) Variable 'rc' is reassigned a 
value before the old one has been used.
[staging/src/clm/agent/clma_mds.c:316]: (style) The scope of the variable 
'ret_bytes' can be reduced.
[staging/src/clm/agent/clma_mds.c:1084]: (style) The scope of the variable 'rc' 
can be reduced.
[staging/src/clm/agent/clma_util.c:714]: (style) The function 
'logtrace_init_constructor' is never used.
[staging/src/clm/agent/clma_api.c:1171]: (style) The function 
'saClmClusterNodeGet' is never used.
[staging/src/clm/agent/clma_api.c:1392]: (style) The function 
'saClmClusterNodeGetAsync' is never used.
[staging/src/clm/agent/clma_api.c:1207]: (style) The function 
'saClmClusterNodeGet_4' is never used.
[staging/src/clm/agent/clma_api.c:1492]: (style) The function 
'saClmClusterNotificationFree_4' is never used.
[staging/src/clm/agent/clma_api.c:903]: (style) The function 
'saClmClusterTrack' is never used.
[staging/src/clm/agent/clma_api.c:1054]: (style) The function 
'saClmClusterTrackStop' is never used.
[staging/src/clm/agent/clma_api.c:930]: (style) The function 
'saClmClusterTrack_4' is never used.
[staging/src/clm/agent/clma_api.c:742]: (style) The function 'saClmDispatch' is 
never used.
[staging/src/clm/agent/clma_api.c:809]: (style) The function 'saClmFinalize' is 
never used.
[staging/src/clm/agent/clma_api.c:498]: (style) The function 'saClmInitialize' 
is never used.
[staging/src/clm/agent/clma_api.c:548]: (style) The function 
'saClmInitialize_4' is never used.
[staging/src/clm/agent/clma_api.c:1555]: (style) The function 'saClmResponse_4' 
is never used.
[staging/src/clm/agent/clma_api.c:684]: (style) The function 
'saClmSelectionObjectGet' is never used.







---

Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to