- **status**: review --> fixed
- **Comment**:
changeset: 8649:4a94f841107b
tag: tip
user: A V Mahesh <[email protected]>
date: Tue Mar 07 09:44:44 2017 +0530
summary: log: Fix all Cppcheck 1.77 issues [#2326]
---
** [tickets:#2326] log : fix all cpp check issues **
**Status:** fixed
**Milestone:** next
**Created:** Mon Feb 27, 2017 03:40 AM UTC by A V Mahesh (AVM)
**Last Updated:** Tue Feb 28, 2017 06:47 AM UTC
**Owner:** A V Mahesh (AVM)
[staging/src/log/logd/lgs_config.h:90]: (performance) Function parameter
param_name should be passed by reference.
[staging/src/log/logd/lgs_config.h:230]: (performance) Function parameter
attribute_name should be passed by reference.
[staging/src/log/logd/lgs_config.h:231]: (performance) Function parameter
value_list should be passed by reference.
[staging/src/log/logd/lgs_config.h:238]: (performance) Function parameter
attribute_name should be passed by reference.
[staging/src/log/logd/lgs_config.h:239]: (performance) Function parameter
value_list should be passed by reference.
[staging/src/log/logd/lgs_clm.cc:137]: (style) The scope of the variable
clm_node can be reduced.
[staging/src/log/logd/lgs_clm.cc:220]: (performance) Prefer prefix ++/--
operators for non-primitive types.
[staging/src/log/logd/lgs_config.cc:401] ->
[staging/src/log/logd/lgs_config.cc:498]: (warning) Either the condition
allocmem_ptr!=NULL is redundant or there is possible null pointer dereference:
param_ptr.
[staging/src/log/logd/lgs_config.cc:410] ->
[staging/src/log/logd/lgs_config.cc:498]: (warning) Either the condition
allocmem_ptr!=NULL is redundant or there is possible null pointer dereference:
param_ptr.
[staging/src/log/logd/lgs_config.cc:184] ->
[staging/src/log/logd/lgs_config.cc:190]: (style) Variable cfg_param_str is
reassigned a value before the old one has been used.
[staging/src/log/logd/lgs_config.cc:183]: (style) The scope of the variable
prev_size can be reduced.
[staging/src/log/logd/lgs_config.cc:727]: (style) The scope of the variable
nl_cnt can be reduced.
[staging/src/log/logd/lgs_config.cc:995]: (style) The scope of the variable
value_string can be reduced.
[staging/src/log/logd/lgs_config.cc:1034]: (style) The scope of the variable n
can be reduced.
[staging/src/log/logd/lgs_config.cc:142]: (warning) Member variable
_lgs_conf_t::chkp_file_close_time is not initialized in the constructor.
[staging/src/log/logd/lgs_config.cc:293]: (performance) Function parameter
attribute_name should be passed by reference.
[staging/src/log/logd/lgs_config.cc:294]: (performance) Function parameter
value_list should be passed by reference.
[staging/src/log/logd/lgs_config.cc:324]: (performance) Function parameter
attribute_name should be passed by reference.
[staging/src/log/logd/lgs_config.cc:325]: (performance) Function parameter
value_list should be passed by reference.
[staging/src/log/logd/lgs_evt.cc:531] -> [staging/src/log/logd/lgs_evt.cc:536]:
(style) Variable lga_down_rec is reassigned a value before the old one has been
used.
[staging/src/log/logd/lgs_evt.cc:416]: (style) The scope of the variable
ckpt_ptr can be reduced.
[staging/src/log/logd/lgs_evt.cc:553]: (style) The scope of the variable stream
can be reduced.
[staging/src/log/logd/lgs_evt.cc:163]: (error) Mismatching allocation and
deallocation: client
[staging/src/log/logd/lgs_evt.cc:168]: (error) Mismatching allocation and
deallocation: client
[staging/src/log/logd/lgs_evt.cc:344]: (performance) Prefer prefix ++/--
operators for non-primitive types.
[staging/src/log/logd/lgs_filehdl.cc:542]: (style) Variable len is assigned a
value that is never used.
[staging/src/log/logd/lgs_fmt.cc:560]: (style) The scope of the variable no_ch
can be reduced.
[staging/src/log/logd/lgs_imm.cc:3478] ->
[staging/src/log/logd/lgs_imm.cc:3479]: (warning) Either the condition
attribute!=NULL is redundant or there is possible null pointer dereference:
attribute.
[staging/src/log/logd/lgs_imm.cc:963]: (style) The scope of the variable i can
be reduced.
[staging/src/log/logd/lgs_imm.cc:1885]: (style) The scope of the variable
current_time can be reduced.
[staging/src/log/logd/lgs_imm.cc:1924]: (style) The scope of the variable
stream can be reduced.
[staging/src/log/logd/lgs_imm.cc:3264]: (style) The scope of the variable
name_str can be reduced.
[staging/src/log/logd/lgs_imm.cc:3474]: (style) The scope of the variable value
can be reduced.
[staging/src/log/logd/lgs_imm_gcfg.cc:857] ->
[staging/src/log/logd/lgs_imm_gcfg.cc:859]: (style) Variable rc is reassigned a
value before the old one has been used.
[staging/src/log/logd/lgs_imm_gcfg.cc:532]: (style) The scope of the variable
name_len can be reduced.
[staging/src/log/logd/lgs_imm_gcfg.cc:940]: (style) The scope of the variable
rc can be reduced.
[staging/src/log/logd/lgs_main.cc:319]: (style) Suspicious condition
(assignment + comparison); Clarify expression with parentheses.
[staging/src/log/logd/lgs_mbcsv.cc:214]: (style) Suspicious condition
(assignment + comparison); Clarify expression with parentheses.
[staging/src/log/logd/lgs_mbcsv.cc:541] ->
[staging/src/log/logd/lgs_mbcsv.cc:551]: (style) Variable rc is reassigned a
value before the old one has been used.
[staging/src/log/logd/lgs_mbcsv.cc:695] ->
[staging/src/log/logd/lgs_mbcsv.cc:702]: (style) Variable pheader is reassigned
a value before the old one has been used.
[staging/src/log/logd/lgs_mbcsv.cc:938] ->
[staging/src/log/logd/lgs_mbcsv.cc:941]: (style) Variable rc is reassigned a
value before the old one has been used.
[staging/src/log/logd/lgs_mbcsv.cc:1125] ->
[staging/src/log/logd/lgs_mbcsv.cc:1148]: (style) Variable rc is reassigned a
value before the old one has been used.
[staging/src/log/logd/lgs_mbcsv.cc:1875]: (style) Checking if unsigned variable
clientId is less than zero.
[staging/src/log/logd/lgs_mbcsv.cc:711]: (performance) Prefer prefix ++/--
operators for non-primitive types.
[staging/src/log/logd/lgs_mds.cc:1003] ->
[staging/src/log/logd/lgs_mds.cc:1009]: (style) Variable rc is reassigned a
value before the old one has been used.
[staging/src/log/logd/lgs_stream.cc:416]: (warning) Assignment of function
parameter has no effect outside the function. Did you forget dereferencing it?
[staging/src/log/logd/lgs_stream.cc:665] ->
[staging/src/log/logd/lgs_stream.cc:669]: (style) Variable stream is reassigned
a value before the old one has been used.
[staging/src/log/logd/lgs_stream.cc:1337]: (style) Unsigned variable id cant be
negative so it is unnecessary to test it.
[staging/src/log/logd/lgs_util.cc:363]: (performance) Prefer prefix ++/--
operators for non-primitive types.
[staging/src/log/logd/lgs_util.cc:912]: (performance) Prefer prefix ++/--
operators for non-primitive types.
[staging/src/log/logd/lgs_config.cc:1854]: (style) The function
lgs_cfg_read_trace is never used.
[staging/src/log/logd/lgs_util.cc:521]: (style) The function
lgs_check_path_exists_h is never used.
[staging/src/log/logd/lgs_imm.cc:3234]: (style) The function
lgs_delete_one_stream_object is never used.
[staging/src/log/logd/lgs_stream.cc:408]: (style) The function
log_free_stream_resources is never used.
[staging/src/log/logd/lgs_stream.cc:1447]: (style) The function
log_stream_id_print is never used.
[staging/src/log/logd/lgs_config.cc:1513]: (style) The function
update_multival_rattr is never used.
(information) Cppcheck cannot find all the include files (use --check-config
for details)
[staging/src/log/agent/lga_api.c:1104] ->
[staging/src/log/agent/lga_api.c:1106]: (style) Variable logSvcUsrChars is
reassigned a value before the old one has been used.
[staging/src/log/agent/lga_mds.c:1408] ->
[staging/src/log/agent/lga_mds.c:1428]: (style) Variable rc is reassigned a
value before the old one has been used.
[staging/src/log/agent/lga_mds.c:1219]: (style) The scope of the variable rc
can be reduced.
[staging/src/log/agent/lga_state.c:412] ->
[staging/src/log/agent/lga_state.c:421]: (style) Variable ncs_rc is reassigned
a value before the old one has been used.
[staging/src/log/agent/lga_util.c:312] ->
[staging/src/log/agent/lga_util.c:317]: (style) Variable client_hdl is
reassigned a value before the old one has been used.
[staging/src/log/agent/lga_util.c:416]: (style) The function lga_force_shutdown
is never used.
[staging/src/log/agent/lga_util.c:890]: (style) The function
logtrace_init_constructor is never used.
[staging/src/log/agent/lga_api.c:419]: (style) The function saLogDispatch is
never used.
[staging/src/log/agent/lga_api.c:538]: (style) The function saLogFinalize is
never used.
[staging/src/log/agent/lga_api.c:165]: (style) The function saLogInitialize is
never used.
[staging/src/log/agent/lga_api.c:1529]: (style) The function saLogLimitGet is
never used.
[staging/src/log/agent/lga_api.c:351]: (style) The function
saLogSelectionObjectGet is never used.
[staging/src/log/agent/lga_api.c:1373]: (style) The function saLogStreamClose
is never used.
[staging/src/log/agent/lga_api.c:1026]: (style) The function
saLogStreamOpenAsync_2 is never used.
[staging/src/log/agent/lga_api.c:798]: (style) The function saLogStreamOpen_2
is never used.
[staging/src/log/agent/lga_api.c:1164]: (style) The function saLogWriteLog is
never used.
[staging/src/log/agent/lga_api.c:1180]: (style) The function saLogWriteLogAsync
is never used.
---
Sent from sourceforge.net because [email protected] 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.
------------------------------------------------------------------------------
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-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets