Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] warnings from cppcheck #4539

Open
jameslamb opened this issue Aug 20, 2021 · 5 comments
Open

[ci] warnings from cppcheck #4539

jameslamb opened this issue Aug 20, 2021 · 5 comments

Comments

@jameslamb
Copy link
Collaborator

jameslamb commented Aug 20, 2021

Summary

Warnings caught by cppcheck should be resolved, if they are determined to be genuine issues and not false positives.

Motivation

cppcheck is a static analyzer for C++ code.

This tool can catch some classes of issues that are not caught by other linters or tests with sanitizers, and it does that using a lightweight approach that doesn't require compiling an instrumented version of the library.

See https://sourceforge.net/p/cppcheck/wiki/ListOfChecks/ for a full list of checks.

Description

Similar to the approach taken in LightGBM with cpplint (#1990) and mypy (#3867), for a time these checks might be run in continuous integration without blocking merges, just as extra information about the state of the code.

See http://cppcheck.sourceforge.net/ for instructions on how to install cppcheck on different operating systems.

LightGBM is a large, complex project and its codebase contains many possible combinations of #ifdef conditions. Each additional #ifdef adds another combination of things to try, which can slow down checking substantially and have a big impact on the amount of logs produced.

To ensure that cppcheck does not take too long and that you can see all of the logs after it's done, I recommend doing the following:

  1. direct output to a file
  2. remove the third-party libraries included as submodules in LightGBM before running this check
    • NOTE: you can restore these at any time with git submodulue init && git submodule update --recursive
  3. undefine some preprocessor defines with -U to limit the number of combinations searched (you can always selectively remove these -U checks to do more thorough checks!)
rm -r ./external_libs

cppcheck \
    --force \
    --enable=all \
    --std=c++11 \
    -I include/ \
    -UDEBUG \
    -ULABEL_T_USE_DOUBLE \
    -ULGB_R_BUILD \
    -USCORE_T_USE_DOUBLE \
    -Usun \
    -U__sun \
    -U__SVR4 \
    -U__svr4__ \
    -UTIMETAG \
    -UUSE_CUDA \
    -UUSE_GPU \
    -UUSE_MPI \
    src/ \
> cppcheck.txt 2>&1

To generate a list of just lines with warnings, run the following:

# NOTE: the LGBM_ condition below handles the fact that functions in c_api.cpp are the public interface of the
#             shared library, so it's ok that they look "unused"
cat cppcheck.txt \
| grep -E '\[[a-zA-Z]+\]$' \
| grep -v -E 'LGBM_[A-Za-z]+.*is never used'

Piping that to wc -l will give you the number of warnings left.

How to Contribute

Look at the current list of warnings by running cppcheck yourself locally (following the steps in the "Description" section above).

Small pull requests focused on a single part of the codebase or type of cppcheck warning are greatly appreciated. Please do not submit a pull request that attempts to fix many of the cppcheck warnings all at once.

When submitting a pull request, include at least the following in the description:

  • a link to this issue
  • the logs of the specific warnings your pull request is intended to address

References

@jameslamb
Copy link
Collaborator Author

471 warnings on master (a926d4f)

I've filtered out only the warnings from the full logs by running the following:

cat cppcheck.txt | grep -E '\[[a-zA-Z]+\]$'
warnings only (click me)
include/LightGBM/train_share_states.h:159:3: warning: Member variable 'TrainingShareStates::bagging_use_indices' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/train_share_states.h:159:3: warning: Member variable 'TrainingShareStates::bagging_indices_cnt' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/feature_group.h:83:5: performance: Variable 'bin_offsets_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
include/LightGBM/feature_group.h:454:5: performance: Variable 'bin_offsets_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/application/predictor.hpp:43:5: performance: Variable 'early_stop_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
include/LightGBM/dataset.h:291:19: style: Class 'Dataset' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < double , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:667:42: style: Condition 'num_threads<=1' is always true [knownConditionTrueFalse]
include/LightGBM/bin.h:50:10: portability: Casting between const signed char * and const double * which have an incompatible binary data representation. [invalidPointerCast]
include/LightGBM/bin.h:51:10: portability: Casting between signed char * and double * which have an incompatible binary data representation. [invalidPointerCast]
include/LightGBM/utils/pipeline_reader.h:48:14: style: Variable 'read_cnt' is reassigned a value before the old one has been used. [redundantAssignment]
include/LightGBM/utils/common.h:243:7: style: The scope of the variable 'frac' can be reduced. [variableScope]
include/LightGBM/utils/common.h:244:16: style: The scope of the variable 'value' can be reduced. [variableScope]
include/LightGBM/utils/common.h:244:23: style: The scope of the variable 'scale' can be reduced. [variableScope]
include/LightGBM/utils/common.h:867:17: style: The scope of the variable 'char_code' can be reduced. [variableScope]
include/LightGBM/bin.h:46:17: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/bin.h:47:11: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:176:16: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:177:10: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:199:16: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:200:10: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:223:18: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:224:12: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:250:16: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:251:10: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/utils/common.h:518:19: style: Checking if unsigned expression 'end-start' is less than zero. [unsignedLessThanZero]
include/LightGBM/utils/common.h:96:73: performance: Function parameter 'prefix' should be passed by const reference. [passedByValue]
include/LightGBM/utils/common.h:417:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:428:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:1151:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:1168:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/feature_group.h:87:20: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/feature_group.h:458:20: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:444:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/openmp_wrapper.h:31:5: performance: Variable 'ex_ptr_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
include/LightGBM/utils/openmp_wrapper.h:46:17: warning: Identical condition 'ex_ptr_!=nullptr', second condition is always false [identicalConditionAfterEarlyExit]
src/boosting/dart.hpp:28:3: warning: Member variable 'DART::sum_weight_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/dart.hpp:28:3: warning: Member variable 'DART::is_update_score_cur_iter_' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < score_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < int32_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/array_args.h:76:11: style: Checking if unsigned expression 'n' is less than zero. [unsignedLessThanZero]
include/LightGBM/utils/array_args.h:89:11: style: Checking if unsigned expression 'n' is less than zero. [unsignedLessThanZero]
include/LightGBM/utils/array_args.h:155:12: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::bag_data_cnt_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::label_idx_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::start_iteration_for_pred_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::is_use_subset_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::is_constant_hessian_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:42:3: performance: Variable 'tree_learner_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/boosting/gbdt.cpp:102:23: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:585:13: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:593:13: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:671:15: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:679:15: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:702:23: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/c_api.cpp:1105:23: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1110:58: warning: The address of local variable 'data' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1110:67: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1155:29: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1164:22: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:108:12: warning: Member variable 'Booster::train_data_' is not initialized in the constructor. [uninitMemberVar]
src/c_api.cpp:2528:3: performance: Variable 'iter_fun_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/c_api.cpp:778:11: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/c_api.cpp:597:26: style: Variable 'pred_sparse_fun' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:414:55: style: Array index 'i_bin' is used before limits check. [arrayIndexThenCheck]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::missing_type_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::sparse_rate_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::min_val_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::max_val_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::default_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::min_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::offset_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::min_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::offset_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::min_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::offset_' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint8_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint16_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint32_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint8_t , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint16_t , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint32_t , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < unsigned long , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
src/io/multi_val_sparse_bin.hpp:29:21: style: Condition 'num_threads>1' is always false [knownConditionTrueFalse]
src/io/multi_val_sparse_bin.hpp:81:28: style: Local variable 'offsets' shadows outer function [shadowFunction]
src/io/bin.cpp:96:21: style: Variable 'cur_cnt_inbin' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:164:23: style: Variable 'left_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:165:18: style: Variable 'cnt_zero' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:166:24: style: Variable 'right_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:169:23: style: Variable 'left_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:171:24: style: Variable 'right_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:173:18: style: Variable 'cnt_zero' is assigned a value that is never used. [unreadVariable]
src/io/multi_val_sparse_bin.hpp:126:27: style: Variable 'pf_idx' is assigned a value that is never used. [unreadVariable]
src/io/multi_val_dense_bin.hpp:70:27: style: Variable 'pf_idx' is assigned a value that is never used. [unreadVariable]
src/io/dense_bin.hpp:113:27: style: Variable 'pf_idx' is assigned a value that is never used. [unreadVariable]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_features_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_total_features_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_groups_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::bin_construct_sample_cnt_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::min_data_in_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::use_missing_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::zero_as_missing_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_numeric_features_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:26:3: performance: Variable 'data_filename_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/io/dataset.cpp:443:55: performance: Function parameter 'most_freq_bins' should be passed by const reference. [passedByValue]
src/io/dataset.cpp:444:33: performance: Function parameter 'offsets' should be passed by const reference. [passedByValue]
src/io/dataset.cpp:149:60: error: Out of bounds access in expression 'group_total_data_cnt[gid]' because 'group_total_data_cnt' is empty. [containerOutOfBounds]
src/io/dataset.cpp:150:58: error: Out of bounds access in expression 'group_used_row_cnt[gid]' because 'group_used_row_cnt' is empty. [containerOutOfBounds]
src/io/dataset.cpp:154:48: error: Out of bounds access in expression 'conflict_marks[gid]' because 'conflict_marks' is empty. [containerOutOfBounds]
src/io/dataset.cpp:142:23: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:205:31: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:271:26: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:362:19: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:1289:11: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:1298:11: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset_loader.cpp:486:9: portability: Casting between const signed char * and const double * which have an incompatible binary data representation. [invalidPointerCast]
src/io/dataset_loader.cpp:605:38: portability: Casting between const signed char * and const float * which have an incompatible binary data representation. [invalidPointerCast]
src/io/dataset_loader.cpp:1348:36: performance: Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. [stlcstrParam]
src/io/dataset_loader.cpp:1352:33: performance: Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. [stlcstrParam]
src/io/dataset_loader.cpp:612:15: style: Variable 'mem_ptr' is assigned a value that is never used. [unreadVariable]
src/io/file_io.cpp:29:8: style: The function 'Init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:45:10: style: The function 'Read' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:49:10: style: The function 'Write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:73:8: style: The function 'Init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:93:10: style: The function 'Read' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:97:10: style: The function 'Write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/json11.cpp:525:16: style: Local variable 'esc' shadows outer function [shadowFunction]
src/io/json11.cpp:772:52: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm]
src/io/parser.cpp:195:27: style: Condition 'lines.size()>1' is always true [knownConditionTrueFalse]
src/io/parser.cpp:79:18: style: Checking if unsigned expression 'read_len' is less than zero. [unsignedLessThanZero]
src/io/parser.cpp:100:16: style: Checking if unsigned expression 'read_len' is less than zero. [unsignedLessThanZero]
src/io/parser.cpp:139:16: style: Checking if unsigned expression 'read_len' is less than zero. [unsignedLessThanZero]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::n_data_block_' is not initialized in the constructor. [uninitMemberVar]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::data_block_size_' is not initialized in the constructor. [uninitMemberVar]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::min_block_size_' is not initialized in the constructor. [uninitMemberVar]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::origin_hist_data_' is not initialized in the constructor. [uninitMemberVar]
src/io/tree.cpp:685:7: warning: Member variable 'Tree::max_leaves_' is not initialized in the constructor. [uninitMemberVar]
src/io/tree.cpp:685:7: warning: Member variable 'Tree::track_branch_features_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::rank_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::socket_timeout_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::local_listen_port_' is not initialized in the constructor. [uninitMemberVar]
src/network/socket_wrapper.hpp:102:5: performance: Variable 'sockfd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/network/socket_wrapper.hpp:111:5: performance: Variable 'sockfd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/network/socket_wrapper.hpp:120:5: performance: Variable 'sockfd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/regression_metric.hpp:215:33: style: Expression 'log(1 + x)' can be replaced by 'log1p(x)' to avoid loss of precision. [unpreciseMathCall]
src/metric/xentropy_metric.hpp:197:30: style: Expression 'log(1 + x)' can be replaced by 'log1p(x)' to avoid loss of precision. [unpreciseMathCall]
src/metric/xentropy_metric.hpp:203:30: style: Expression 'log(1 + x)' can be replaced by 'log1p(x)' to avoid loss of precision. [unpreciseMathCall]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::sum_query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::sum_query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:168:12: warning: Member variable 'CrossEntropyLambdaMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:168:12: warning: Member variable 'CrossEntropyLambdaMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:168:12: warning: Member variable 'CrossEntropyLambdaMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::presum_label_entropy_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:24:5: performance: Variable 'eval_at_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/multiclass_metric.hpp:187:5: performance: Variable 'class_weights_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/rank_metric.hpp:23:5: performance: Variable 'eval_at_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/multiclass_metric.hpp:64:19: style: The if condition is the same as the previous if condition [duplicateCondition]
src/metric/regression_metric.hpp:266:25: style: Same expression on both sides of '/'. [duplicateExpression]
src/metric/multiclass_metric.hpp:144:11: style: Variable 'ref_score' can be declared with const [constVariable]
src/metric/map_metric.hpp:33:13: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/metric/rank_metric.hpp:35:13: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/network/linker_topo.cpp:48:22: warning: Member variable 'RecursiveHalvingMap::type' is not initialized in the constructor. [uninitMemberVar]
src/network/linker_topo.cpp:48:22: warning: Member variable 'RecursiveHalvingMap::is_power_of_2' is not initialized in the constructor. [uninitMemberVar]
src/network/linker_topo.cpp:48:22: warning: Member variable 'RecursiveHalvingMap::neighbor' is not initialized in the constructor. [uninitMemberVar]
src/network/linker_topo.cpp:52:22: warning: Member variable 'RecursiveHalvingMap::neighbor' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:206:34: style: Expression 'log(1 + x)' can be replaced by 'log1p(x)' to avoid loss of precision. [unpreciseMathCall]
src/objective/xentropy_objective.hpp:234:22: style: Expression 'log(1 + x)' can be replaced by 'log1p(x)' to avoid loss of precision. [unpreciseMathCall]
src/objective/xentropy_objective.hpp:262:38: style: Expression 'exp(x) - 1' can be replaced by 'expm1(x)' to avoid loss of precision. [unpreciseMathCall]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::num_pos_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::label_val_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::label_weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::need_train_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::num_pos_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::is_unbalance_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::label_val_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::label_weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::scale_pos_weight_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::need_train_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:26:12: warning: Member variable 'MulticlassSoftmax::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:26:12: warning: Member variable 'MulticlassSoftmax::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:26:12: warning: Member variable 'MulticlassSoftmax::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:34:12: warning: Member variable 'MulticlassSoftmax::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:34:12: warning: Member variable 'MulticlassSoftmax::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:34:12: warning: Member variable 'MulticlassSoftmax::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:188:12: warning: Member variable 'MulticlassOVA::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:197:12: warning: Member variable 'MulticlassOVA::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:100:12: warning: Member variable 'LambdarankNDCG::sigmoid_table_idx_factor_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::sigmoid_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::norm_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::truncation_level_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::sigmoid_table_idx_factor_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:95:12: warning: Member variable 'RegressionL2loss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:95:12: warning: Member variable 'RegressionL2loss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:95:12: warning: Member variable 'RegressionL2loss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:100:12: warning: Member variable 'RegressionL2loss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:100:12: warning: Member variable 'RegressionL2loss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:100:12: warning: Member variable 'RegressionL2loss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:303:12: warning: Member variable 'RegressionHuberLoss::alpha_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:357:12: warning: Member variable 'RegressionFairLoss::c_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:408:12: warning: Member variable 'RegressionPoissonLoss::max_delta_step_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:718:12: warning: Member variable 'RegressionTweedieLoss::rho_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:46:12: warning: Member variable 'CrossEntropy::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:46:12: warning: Member variable 'CrossEntropy::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:46:12: warning: Member variable 'CrossEntropy::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:49:12: warning: Member variable 'CrossEntropy::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:49:12: warning: Member variable 'CrossEntropy::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:49:12: warning: Member variable 'CrossEntropy::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:154:12: warning: Member variable 'CrossEntropyLambda::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:154:12: warning: Member variable 'CrossEntropyLambda::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:154:12: warning: Member variable 'CrossEntropyLambda::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:159:12: warning: Member variable 'CrossEntropyLambda::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:159:12: warning: Member variable 'CrossEntropyLambda::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:159:12: warning: Member variable 'CrossEntropyLambda::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:105:5: performance: Variable 'label_gain_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/objective/regression_objective.hpp:481:5: performance: Variable 'alpha_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/objective/xentropy_objective.hpp:156:19: performance: Variable 'max_weight_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/objective/regression_objective.hpp:105:15: style: Consider using std::any_of, std::all_of, std::none_of, or std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/treelearner/feature_histogram.hpp:176:11: information: TemplateSimplifier: max template recursion (100) reached for template 'FindBestThresholdSequentially<false , false , false , true , true , false , true , false>'. You might want to limit Cppcheck recursion. [templateRecursion]
src/treelearner/split_info.hpp:217:5: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
src/treelearner/monotone_constraints.hpp:465:12: warning: Member variable 'LeafConstraintsBase::tree_' is not initialized in the constructor. Maybe it should be initialized directly in the class LeafConstraintsBase? [uninitDerivedMemberVar]
src/treelearner/feature_histogram.hpp:45:3: warning: Member variable 'FeatureHistogram::meta_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/col_sampler.hpp:22:12: warning: Member variable 'ColSampler::train_data_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/col_sampler.hpp:22:12: warning: Member variable 'ColSampler::need_reset_bytree_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/col_sampler.hpp:22:12: warning: Member variable 'ColSampler::used_cnt_bytree_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_partition.hpp:23:3: warning: Member variable 'DataPartition::used_data_count_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/leaf_splits.hpp:24:3: warning: Member variable 'LeafSplits::leaf_index_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/leaf_splits.hpp:24:3: warning: Member variable 'LeafSplits::sum_gradients_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/leaf_splits.hpp:24:3: warning: Member variable 'LeafSplits::sum_hessians_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < CUDATreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < CUDATreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < GPUTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < GPUTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < SerialTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < SerialTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/monotone_constraints.hpp:184:5: performance: Variable 'thresholds_min_constraints' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:185:5: performance: Variable 'thresholds_max_constraints' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:186:5: performance: Variable 'cumulative_min_constraints_left_to_right' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:187:5: performance: Variable 'cumulative_min_constraints_right_to_left' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:188:5: performance: Variable 'cumulative_max_constraints_left_to_right' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:189:5: performance: Variable 'cumulative_max_constraints_right_to_left' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/split_info.hpp:177:25: warning: Opposite inner 'return' condition leads to a dead code block. [oppositeInnerCondition]
src/treelearner/split_info.hpp:271:25: warning: Opposite inner 'return' condition leads to a dead code block. [oppositeInnerCondition]
src/treelearner/monotone_constraints.hpp:946:27: style: Variable 'previous_constraint' is reassigned a value before the old one has been used. [redundantAssignment]
src/treelearner/monotone_constraints.hpp:884:12: style: The scope of the variable 'current_constraint' can be reduced. [variableScope]
src/treelearner/data_parallel_tree_learner.cpp:133:52: style: The scope of the variable 'p1' can be reduced. [variableScope]
src/treelearner/data_parallel_tree_learner.cpp:134:46: style: The scope of the variable 'p2' can be reduced. [variableScope]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < CUDATreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < CUDATreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < GPUTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < GPUTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < SerialTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < SerialTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/linear_tree_learner.h:21:12: warning: Member variable 'LinearTreeLearner::any_nan_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/ocl/histogram16.cl:15:1: error: syntax error [syntaxError]
src/treelearner/ocl/histogram256.cl:15:1: error: syntax error [syntaxError]
src/treelearner/ocl/histogram64.cl:15:1: error: syntax error [syntaxError]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::num_features_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::train_data_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::gradients_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::hessians_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::parent_leaf_histogram_array_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::smaller_leaf_histogram_array_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::larger_leaf_histogram_array_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::forced_split_json_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:730:28: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
src/treelearner/cost_effective_gradient_boosting.hpp:92:11: style: The scope of the variable 'ref_best_split_per_leaf' can be reduced. [variableScope]
src/treelearner/cost_effective_gradient_boosting.hpp:67:52: performance: Function parameter 'split_info' should be passed by const reference. [passedByValue]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < CUDATreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < CUDATreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < GPUTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < GPUTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < SerialTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < SerialTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:105:52: style: The scope of the variable 'p1' can be reduced. [variableScope]
src/treelearner/voting_parallel_tree_learner.cpp:106:46: style: The scope of the variable 'p2' can be reduced. [variableScope]
src/metric/dcg_calculator.cpp:110:0: style: The function 'CalDCGAtK' is never used. [unusedFunction]
src/c_api.cpp:1628:0: style: The function 'LGBM_BoosterAddValidData' is never used. [unusedFunction]
src/c_api.cpp:1828:0: style: The function 'LGBM_BoosterCalcNumPredict' is never used. [unusedFunction]
src/c_api.cpp:1570:0: style: The function 'LGBM_BoosterCreate' is never used. [unusedFunction]
src/c_api.cpp:1580:0: style: The function 'LGBM_BoosterCreateFromModelfile' is never used. [unusedFunction]
src/c_api.cpp:2273:0: style: The function 'LGBM_BoosterDumpModel' is never used. [unusedFunction]
src/c_api.cpp:2311:0: style: The function 'LGBM_BoosterFeatureImportance' is never used. [unusedFunction]
src/c_api.cpp:1606:0: style: The function 'LGBM_BoosterFree' is never used. [unusedFunction]
src/c_api.cpp:1974:0: style: The function 'LGBM_BoosterFreePredictSparse' is never used. [unusedFunction]
src/c_api.cpp:1714:0: style: The function 'LGBM_BoosterGetCurrentIteration' is never used. [unusedFunction]
src/c_api.cpp:1773:0: style: The function 'LGBM_BoosterGetEval' is never used. [unusedFunction]
src/c_api.cpp:1735:0: style: The function 'LGBM_BoosterGetEvalCounts' is never used. [unusedFunction]
src/c_api.cpp:1742:0: style: The function 'LGBM_BoosterGetEvalNames' is never used. [unusedFunction]
src/c_api.cpp:1754:0: style: The function 'LGBM_BoosterGetFeatureNames' is never used. [unusedFunction]
src/c_api.cpp:2291:0: style: The function 'LGBM_BoosterGetLeafValue' is never used. [unusedFunction]
src/c_api.cpp:1660:0: style: The function 'LGBM_BoosterGetLinear' is never used. [unusedFunction]
src/c_api.cpp:2333:0: style: The function 'LGBM_BoosterGetLowerBoundValue' is never used. [unusedFunction]
src/c_api.cpp:1653:0: style: The function 'LGBM_BoosterGetNumClasses' is never used. [unusedFunction]
src/c_api.cpp:1766:0: style: The function 'LGBM_BoosterGetNumFeature' is never used. [unusedFunction]
src/c_api.cpp:1788:0: style: The function 'LGBM_BoosterGetNumPredict' is never used. [unusedFunction]
src/c_api.cpp:1797:0: style: The function 'LGBM_BoosterGetPredict' is never used. [unusedFunction]
src/c_api.cpp:2324:0: style: The function 'LGBM_BoosterGetUpperBoundValue' is never used. [unusedFunction]
src/c_api.cpp:1591:0: style: The function 'LGBM_BoosterLoadModelFromString' is never used. [unusedFunction]
src/c_api.cpp:1619:0: style: The function 'LGBM_BoosterMerge' is never used. [unusedFunction]
src/c_api.cpp:1721:0: style: The function 'LGBM_BoosterNumModelPerIteration' is never used. [unusedFunction]
src/c_api.cpp:1728:0: style: The function 'LGBM_BoosterNumberOfTotalModel' is never used. [unusedFunction]
src/c_api.cpp:2078:0: style: The function 'LGBM_BoosterPredictForCSC' is never used. [unusedFunction]
src/c_api.cpp:1873:0: style: The function 'LGBM_BoosterPredictForCSR' is never used. [unusedFunction]
src/c_api.cpp:1994:0: style: The function 'LGBM_BoosterPredictForCSRSingleRow' is never used. [unusedFunction]
src/c_api.cpp:2060:0: style: The function 'LGBM_BoosterPredictForCSRSingleRowFast' is never used. [unusedFunction]
src/c_api.cpp:2028:0: style: The function 'LGBM_BoosterPredictForCSRSingleRowFastInit' is never used. [unusedFunction]
src/c_api.cpp:1807:0: style: The function 'LGBM_BoosterPredictForFile' is never used. [unusedFunction]
src/c_api.cpp:2127:0: style: The function 'LGBM_BoosterPredictForMat' is never used. [unusedFunction]
src/c_api.cpp:2153:0: style: The function 'LGBM_BoosterPredictForMatSingleRow' is never used. [unusedFunction]
src/c_api.cpp:2204:0: style: The function 'LGBM_BoosterPredictForMatSingleRowFast' is never used. [unusedFunction]
src/c_api.cpp:2178:0: style: The function 'LGBM_BoosterPredictForMatSingleRowFastInit' is never used. [unusedFunction]
src/c_api.cpp:2219:0: style: The function 'LGBM_BoosterPredictForMats' is never used. [unusedFunction]
src/c_api.cpp:1908:0: style: The function 'LGBM_BoosterPredictSparseOutput' is never used. [unusedFunction]
src/c_api.cpp:1667:0: style: The function 'LGBM_BoosterRefit' is never used. [unusedFunction]
src/c_api.cpp:1646:0: style: The function 'LGBM_BoosterResetParameter' is never used. [unusedFunction]
src/c_api.cpp:1637:0: style: The function 'LGBM_BoosterResetTrainingData' is never used. [unusedFunction]
src/c_api.cpp:1707:0: style: The function 'LGBM_BoosterRollbackOneIter' is never used. [unusedFunction]
src/c_api.cpp:2243:0: style: The function 'LGBM_BoosterSaveModel' is never used. [unusedFunction]
src/c_api.cpp:2255:0: style: The function 'LGBM_BoosterSaveModelToString' is never used. [unusedFunction]
src/c_api.cpp:2301:0: style: The function 'LGBM_BoosterSetLeafValue' is never used. [unusedFunction]
src/c_api.cpp:1612:0: style: The function 'LGBM_BoosterShuffleModels' is never used. [unusedFunction]
src/c_api.cpp:1674:0: style: The function 'LGBM_BoosterUpdateOneIter' is never used. [unusedFunction]
src/c_api.cpp:1685:0: style: The function 'LGBM_BoosterUpdateOneIterCustom' is never used. [unusedFunction]
src/c_api.cpp:1559:0: style: The function 'LGBM_DatasetAddFeaturesFrom' is never used. [unusedFunction]
src/c_api.cpp:995:0: style: The function 'LGBM_DatasetCreateByReference' is never used. [unusedFunction]
src/c_api.cpp:1316:0: style: The function 'LGBM_DatasetCreateFromCSC' is never used. [unusedFunction]
src/c_api.cpp:1171:0: style: The function 'LGBM_DatasetCreateFromCSR' is never used. [unusedFunction]
src/c_api.cpp:1243:0: style: The function 'LGBM_DatasetCreateFromCSRFunc' is never used. [unusedFunction]
src/c_api.cpp:946:0: style: The function 'LGBM_DatasetCreateFromFile' is never used. [unusedFunction]
src/c_api.cpp:1067:0: style: The function 'LGBM_DatasetCreateFromMat' is never used. [unusedFunction]
src/c_api.cpp:972:0: style: The function 'LGBM_DatasetCreateFromSampledColumn' is never used. [unusedFunction]
src/c_api.cpp:1483:0: style: The function 'LGBM_DatasetDumpText' is never used. [unusedFunction]
src/c_api.cpp:1469:0: style: The function 'LGBM_DatasetFree' is never used. [unusedFunction]
src/c_api.cpp:1444:0: style: The function 'LGBM_DatasetGetFeatureNames' is never used. [unusedFunction]
src/c_api.cpp:1510:0: style: The function 'LGBM_DatasetGetField' is never used. [unusedFunction]
src/c_api.cpp:1543:0: style: The function 'LGBM_DatasetGetNumData' is never used. [unusedFunction]
src/c_api.cpp:1551:0: style: The function 'LGBM_DatasetGetNumFeature' is never used. [unusedFunction]
src/c_api.cpp:1402:0: style: The function 'LGBM_DatasetGetSubset' is never used. [unusedFunction]
src/c_api.cpp:1006:0: style: The function 'LGBM_DatasetPushRows' is never used. [unusedFunction]
src/c_api.cpp:1034:0: style: The function 'LGBM_DatasetPushRowsByCSR' is never used. [unusedFunction]
src/c_api.cpp:1475:0: style: The function 'LGBM_DatasetSaveBinary' is never used. [unusedFunction]
src/c_api.cpp:1430:0: style: The function 'LGBM_DatasetSetFeatureNames' is never used. [unusedFunction]
src/c_api.cpp:1491:0: style: The function 'LGBM_DatasetSetField' is never used. [unusedFunction]
src/c_api.cpp:1533:0: style: The function 'LGBM_DatasetUpdateParamChecking' is never used. [unusedFunction]
src/c_api.cpp:1867:0: style: The function 'LGBM_FastConfigFree' is never used. [unusedFunction]
src/c_api.cpp:891:0: style: The function 'LGBM_GetLastError' is never used. [unusedFunction]
src/c_api.cpp:911:0: style: The function 'LGBM_GetSampleCount' is never used. [unusedFunction]
src/c_api.cpp:2358:0: style: The function 'LGBM_NetworkFree' is never used. [unusedFunction]
src/c_api.cpp:2342:0: style: The function 'LGBM_NetworkInit' is never used. [unusedFunction]
src/c_api.cpp:2364:0: style: The function 'LGBM_NetworkInitWithFunctions' is never used. [unusedFunction]
src/c_api.cpp:895:0: style: The function 'LGBM_RegisterLogCallback' is never used. [unusedFunction]
src/c_api.cpp:926:0: style: The function 'LGBM_SampleIndices' is never used. [unusedFunction]
src/io/bin.cpp:523:0: style: The function 'SizeForSpecificBin' is never used. [unusedFunction]
nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingInclude]

The full logs are much larger. Here's a snippet of the format:

Checking src/application/application.cpp ...
include/LightGBM/train_share_states.h:159:3: warning: Member variable 'TrainingShareStates::bagging_use_indices' is not initialized in the constructor. [uninitMemberVar]
  TrainingShareStates() {
  ^
include/LightGBM/train_share_states.h:159:3: warning: Member variable 'TrainingShareStates::bagging_indices_cnt' is not initialized in the constructor. [uninitMemberVar]
  TrainingShareStates() {
  ^
include/LightGBM/feature_group.h:83:5: performance: Variable 'bin_offsets_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
    bin_offsets_ = other.bin_offsets_;
    ^
include/LightGBM/feature_group.h:454:5: performance: Variable 'bin_offsets_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
    bin_offsets_ = other.bin_offsets_;
    ^
src/application/predictor.hpp:43:5: performance: Variable 'early_stop_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
    early_stop_ = CreatePredictionEarlyStopInstance(
    ^
include/LightGBM/dataset.h:291:19: style: Class 'Dataset' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
  LIGHTGBM_EXPORT Dataset(data_size_t num_data);
                  ^
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < double , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
  inline AlignmentAllocator(const AlignmentAllocator<T2, N>&) throw() {}
         ^
include/LightGBM/utils/common.h:667:42: style: Condition 'num_threads<=1' is always true [knownConditionTrueFalse]
  if (len <= kMinInnerLen || num_threads <= 1) {

@jameslamb
Copy link
Collaborator Author

384 warnings on master (fa4ecf4)

Filtered down the warnings using the (updated) steps in this issue's description.

warnings only (click me)
include/LightGBM/train_share_states.h:159:3: warning: Member variable 'TrainingShareStates::bagging_use_indices' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/train_share_states.h:159:3: warning: Member variable 'TrainingShareStates::bagging_indices_cnt' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/feature_group.h:83:5: performance: Variable 'bin_offsets_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
include/LightGBM/feature_group.h:454:5: performance: Variable 'bin_offsets_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/application/predictor.hpp:43:5: performance: Variable 'early_stop_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
include/LightGBM/dataset.h:291:19: style: Class 'Dataset' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < double , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:667:42: style: Condition 'num_threads<=1' is always true [knownConditionTrueFalse]
include/LightGBM/bin.h:50:10: portability: Casting between const signed char * and const double * which have an incompatible binary data representation. [invalidPointerCast]
include/LightGBM/bin.h:51:10: portability: Casting between signed char * and double * which have an incompatible binary data representation. [invalidPointerCast]
include/LightGBM/utils/pipeline_reader.h:48:14: style: Variable 'read_cnt' is reassigned a value before the old one has been used. [redundantAssignment]
include/LightGBM/utils/common.h:243:7: style: The scope of the variable 'frac' can be reduced. [variableScope]
include/LightGBM/utils/common.h:244:16: style: The scope of the variable 'value' can be reduced. [variableScope]
include/LightGBM/utils/common.h:244:23: style: The scope of the variable 'scale' can be reduced. [variableScope]
include/LightGBM/utils/common.h:867:17: style: The scope of the variable 'char_code' can be reduced. [variableScope]
include/LightGBM/bin.h:46:17: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/bin.h:47:11: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:176:16: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:177:10: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:199:16: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:200:10: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:223:18: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:224:12: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/network.h:250:16: style: The scope of the variable 'p1' can be reduced. [variableScope]
include/LightGBM/network.h:251:10: style: The scope of the variable 'p2' can be reduced. [variableScope]
include/LightGBM/utils/common.h:518:19: style: Checking if unsigned expression 'end-start' is less than zero. [unsignedLessThanZero]
include/LightGBM/utils/common.h:96:73: performance: Function parameter 'prefix' should be passed by const reference. [passedByValue]
include/LightGBM/utils/common.h:417:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:428:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:1151:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:1168:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/feature_group.h:87:20: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/feature_group.h:458:20: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/common.h:444:9: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
include/LightGBM/utils/openmp_wrapper.h:31:5: performance: Variable 'ex_ptr_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
include/LightGBM/utils/openmp_wrapper.h:46:17: warning: Identical condition 'ex_ptr_!=nullptr', second condition is always false [identicalConditionAfterEarlyExit]
src/boosting/dart.hpp:28:3: warning: Member variable 'DART::sum_weight_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/dart.hpp:28:3: warning: Member variable 'DART::is_update_score_cur_iter_' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < score_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < int32_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/array_args.h:76:11: style: Checking if unsigned expression 'n' is less than zero. [unsignedLessThanZero]
include/LightGBM/utils/array_args.h:89:11: style: Checking if unsigned expression 'n' is less than zero. [unsignedLessThanZero]
include/LightGBM/utils/array_args.h:155:12: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::bag_data_cnt_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::label_idx_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::start_iteration_for_pred_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::is_use_subset_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:25:7: warning: Member variable 'GBDT::is_constant_hessian_' is not initialized in the constructor. [uninitMemberVar]
src/boosting/gbdt.cpp:42:3: performance: Variable 'tree_learner_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/boosting/gbdt.cpp:102:23: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:585:13: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:593:13: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:671:15: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:679:15: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/boosting/gbdt.cpp:702:23: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/c_api.cpp:1105:23: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1110:58: warning: The address of local variable 'data' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1110:67: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1155:29: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:1164:22: warning: The address of local variable 'nrow' might be accessed at non-zero index. [objectIndex]
src/c_api.cpp:108:12: warning: Member variable 'Booster::train_data_' is not initialized in the constructor. [uninitMemberVar]
src/c_api.cpp:2528:3: performance: Variable 'iter_fun_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/c_api.cpp:778:11: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/c_api.cpp:597:26: style: Variable 'pred_sparse_fun' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:414:55: style: Array index 'i_bin' is used before limits check. [arrayIndexThenCheck]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::missing_type_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::sparse_rate_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::min_val_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::max_val_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::default_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/bin.cpp:23:14: warning: Member variable 'BinMapper::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::min_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint8_t >::offset_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::min_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint16_t >::offset_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::min_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::most_freq_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/sparse_bin.hpp:43:3: warning: Member variable 'SparseBinIterator < uint32_t >::offset_' is not initialized in the constructor. [uninitMemberVar]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint8_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint16_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint32_t , kAlignedSize >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint8_t , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint16_t , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < uint32_t , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
include/LightGBM/utils/common.h:904:10: style: Class 'AlignmentAllocator < unsigned long , 32 >' has a constructor with 1 argument that is not explicit. [noExplicitConstructor]
src/io/multi_val_sparse_bin.hpp:29:21: style: Condition 'num_threads>1' is always false [knownConditionTrueFalse]
src/io/multi_val_sparse_bin.hpp:81:28: style: Local variable 'offsets' shadows outer function [shadowFunction]
src/io/bin.cpp:96:21: style: Variable 'cur_cnt_inbin' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:164:23: style: Variable 'left_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:165:18: style: Variable 'cnt_zero' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:166:24: style: Variable 'right_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:169:23: style: Variable 'left_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:171:24: style: Variable 'right_cnt_data' is assigned a value that is never used. [unreadVariable]
src/io/bin.cpp:173:18: style: Variable 'cnt_zero' is assigned a value that is never used. [unreadVariable]
src/io/multi_val_sparse_bin.hpp:126:27: style: Variable 'pf_idx' is assigned a value that is never used. [unreadVariable]
src/io/multi_val_dense_bin.hpp:70:27: style: Variable 'pf_idx' is assigned a value that is never used. [unreadVariable]
src/io/dense_bin.hpp:113:27: style: Variable 'pf_idx' is assigned a value that is never used. [unreadVariable]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_features_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_total_features_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_groups_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::max_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::bin_construct_sample_cnt_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::min_data_in_bin_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::use_missing_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::zero_as_missing_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:25:10: warning: Member variable 'Dataset::num_numeric_features_' is not initialized in the constructor. [uninitMemberVar]
src/io/dataset.cpp:26:3: performance: Variable 'data_filename_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/io/dataset.cpp:443:55: performance: Function parameter 'most_freq_bins' should be passed by const reference. [passedByValue]
src/io/dataset.cpp:444:33: performance: Function parameter 'offsets' should be passed by const reference. [passedByValue]
src/io/dataset.cpp:149:60: error: Out of bounds access in expression 'group_total_data_cnt[gid]' because 'group_total_data_cnt' is empty. [containerOutOfBounds]
src/io/dataset.cpp:150:58: error: Out of bounds access in expression 'group_used_row_cnt[gid]' because 'group_used_row_cnt' is empty. [containerOutOfBounds]
src/io/dataset.cpp:154:48: error: Out of bounds access in expression 'conflict_marks[gid]' because 'conflict_marks' is empty. [containerOutOfBounds]
src/io/dataset.cpp:142:23: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:205:31: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:271:26: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:362:19: style: Consider using std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:1289:11: style: Consider using std::copy algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset.cpp:1298:11: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/io/dataset_loader.cpp:486:9: portability: Casting between const signed char * and const double * which have an incompatible binary data representation. [invalidPointerCast]
src/io/dataset_loader.cpp:605:38: portability: Casting between const signed char * and const float * which have an incompatible binary data representation. [invalidPointerCast]
src/io/dataset_loader.cpp:1348:36: performance: Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. [stlcstrParam]
src/io/dataset_loader.cpp:1352:33: performance: Passing the result of c_str() to a function that takes std::string as argument no. 1 is slow and redundant. [stlcstrParam]
src/io/dataset_loader.cpp:612:15: style: Variable 'mem_ptr' is assigned a value that is never used. [unreadVariable]
src/io/file_io.cpp:29:8: style: The function 'Init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:45:10: style: The function 'Read' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:49:10: style: The function 'Write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:73:8: style: The function 'Init' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:93:10: style: The function 'Read' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/file_io.cpp:97:10: style: The function 'Write' overrides a function in a base class but is not marked with a 'override' specifier. [missingOverride]
src/io/json11.cpp:525:16: style: Local variable 'esc' shadows outer function [shadowFunction]
src/io/json11.cpp:772:52: style: Consider using std::find_if algorithm instead of a raw loop. [useStlAlgorithm]
src/io/parser.cpp:79:18: style: Checking if unsigned expression 'read_len' is less than zero. [unsignedLessThanZero]
src/io/parser.cpp:100:16: style: Checking if unsigned expression 'read_len' is less than zero. [unsignedLessThanZero]
src/io/parser.cpp:139:16: style: Checking if unsigned expression 'read_len' is less than zero. [unsignedLessThanZero]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::n_data_block_' is not initialized in the constructor. [uninitMemberVar]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::data_block_size_' is not initialized in the constructor. [uninitMemberVar]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::min_block_size_' is not initialized in the constructor. [uninitMemberVar]
src/io/train_share_states.cpp:11:21: warning: Member variable 'MultiValBinWrapper::origin_hist_data_' is not initialized in the constructor. [uninitMemberVar]
src/io/tree.cpp:685:7: warning: Member variable 'Tree::max_leaves_' is not initialized in the constructor. [uninitMemberVar]
src/io/tree.cpp:685:7: warning: Member variable 'Tree::track_branch_features_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::rank_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::socket_timeout_' is not initialized in the constructor. [uninitMemberVar]
src/network/linkers.h:39:3: warning: Member variable 'Linkers::local_listen_port_' is not initialized in the constructor. [uninitMemberVar]
src/network/socket_wrapper.hpp:102:5: performance: Variable 'sockfd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/network/socket_wrapper.hpp:111:5: performance: Variable 'sockfd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/network/socket_wrapper.hpp:120:5: performance: Variable 'sockfd_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:161:12: warning: Member variable 'AUCMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:272:12: warning: Member variable 'AveragePrecisionMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:22:12: warning: Member variable 'MapMetric::sum_query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:185:12: warning: Member variable 'AucMuMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/rank_metric.hpp:21:12: warning: Member variable 'NDCGMetric::sum_query_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:73:12: warning: Member variable 'CrossEntropyMetric::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:168:12: warning: Member variable 'CrossEntropyLambdaMetric::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:168:12: warning: Member variable 'CrossEntropyLambdaMetric::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:168:12: warning: Member variable 'CrossEntropyLambdaMetric::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/xentropy_metric.hpp:251:12: warning: Member variable 'KullbackLeiblerDivergence::presum_label_entropy_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < RMSEMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L2Metric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < QuantileMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < L1Metric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < HuberLossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < FairLossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < PoissonMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < MAPEMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < GammaDevianceMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/regression_metric.hpp:24:12: warning: Member variable 'RegressionMetric < TweedieMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiErrorMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/multiclass_metric.hpp:24:12: warning: Member variable 'MulticlassMetric < MultiSoftmaxLoglossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryLoglossMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::label_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/binary_metric.hpp:26:12: warning: Member variable 'BinaryMetric < BinaryErrorMetric >::sum_weights_' is not initialized in the constructor. [uninitMemberVar]
src/metric/map_metric.hpp:24:5: performance: Variable 'eval_at_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/multiclass_metric.hpp:187:5: performance: Variable 'class_weights_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/rank_metric.hpp:23:5: performance: Variable 'eval_at_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/metric/multiclass_metric.hpp:64:19: style: The if condition is the same as the previous if condition [duplicateCondition]
src/metric/regression_metric.hpp:266:25: style: Same expression on both sides of '/'. [duplicateExpression]
src/metric/multiclass_metric.hpp:144:11: style: Variable 'ref_score' can be declared with const [constVariable]
src/metric/map_metric.hpp:33:13: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/metric/rank_metric.hpp:35:13: style: Consider using std::transform algorithm instead of a raw loop. [useStlAlgorithm]
src/network/linker_topo.cpp:48:22: warning: Member variable 'RecursiveHalvingMap::type' is not initialized in the constructor. [uninitMemberVar]
src/network/linker_topo.cpp:48:22: warning: Member variable 'RecursiveHalvingMap::is_power_of_2' is not initialized in the constructor. [uninitMemberVar]
src/network/linker_topo.cpp:48:22: warning: Member variable 'RecursiveHalvingMap::neighbor' is not initialized in the constructor. [uninitMemberVar]
src/network/linker_topo.cpp:52:22: warning: Member variable 'RecursiveHalvingMap::neighbor' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::num_pos_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::label_val_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::label_weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:23:12: warning: Member variable 'BinaryLogloss::need_train_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::num_pos_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::is_unbalance_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::label_val_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::label_weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::scale_pos_weight_' is not initialized in the constructor. [uninitMemberVar]
src/objective/binary_objective.hpp:41:12: warning: Member variable 'BinaryLogloss::need_train_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:26:12: warning: Member variable 'MulticlassSoftmax::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:26:12: warning: Member variable 'MulticlassSoftmax::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:26:12: warning: Member variable 'MulticlassSoftmax::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:34:12: warning: Member variable 'MulticlassSoftmax::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:34:12: warning: Member variable 'MulticlassSoftmax::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:34:12: warning: Member variable 'MulticlassSoftmax::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:188:12: warning: Member variable 'MulticlassOVA::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/multiclass_objective.hpp:197:12: warning: Member variable 'MulticlassOVA::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:27:12: warning: Member variable 'RankingObjective::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::num_queries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:30:12: warning: Member variable 'RankingObjective::query_boundaries_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:100:12: warning: Member variable 'LambdarankNDCG::sigmoid_table_idx_factor_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::sigmoid_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::norm_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::truncation_level_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:116:12: warning: Member variable 'LambdarankNDCG::sigmoid_table_idx_factor_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:95:12: warning: Member variable 'RegressionL2loss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:95:12: warning: Member variable 'RegressionL2loss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:95:12: warning: Member variable 'RegressionL2loss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:100:12: warning: Member variable 'RegressionL2loss::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:100:12: warning: Member variable 'RegressionL2loss::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:100:12: warning: Member variable 'RegressionL2loss::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:303:12: warning: Member variable 'RegressionHuberLoss::alpha_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:357:12: warning: Member variable 'RegressionFairLoss::c_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:408:12: warning: Member variable 'RegressionPoissonLoss::max_delta_step_' is not initialized in the constructor. [uninitMemberVar]
src/objective/regression_objective.hpp:718:12: warning: Member variable 'RegressionTweedieLoss::rho_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:46:12: warning: Member variable 'CrossEntropy::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:46:12: warning: Member variable 'CrossEntropy::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:46:12: warning: Member variable 'CrossEntropy::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:49:12: warning: Member variable 'CrossEntropy::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:49:12: warning: Member variable 'CrossEntropy::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:49:12: warning: Member variable 'CrossEntropy::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:154:12: warning: Member variable 'CrossEntropyLambda::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:154:12: warning: Member variable 'CrossEntropyLambda::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:154:12: warning: Member variable 'CrossEntropyLambda::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:159:12: warning: Member variable 'CrossEntropyLambda::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:159:12: warning: Member variable 'CrossEntropyLambda::label_' is not initialized in the constructor. [uninitMemberVar]
src/objective/xentropy_objective.hpp:159:12: warning: Member variable 'CrossEntropyLambda::weights_' is not initialized in the constructor. [uninitMemberVar]
src/objective/rank_objective.hpp:105:5: performance: Variable 'label_gain_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/objective/regression_objective.hpp:481:5: performance: Variable 'alpha_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/objective/xentropy_objective.hpp:156:19: performance: Variable 'max_weight_' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/objective/regression_objective.hpp:105:15: style: Consider using std::any_of, std::all_of, std::none_of, or std::accumulate algorithm instead of a raw loop. [useStlAlgorithm]
src/treelearner/feature_histogram.hpp:176:11: information: TemplateSimplifier: max template recursion (100) reached for template 'FindBestThresholdSequentially<false , false , false , true , true , false , true , false>'. You might want to limit Cppcheck recursion. [templateRecursion]
src/treelearner/split_info.hpp:218:5: warning: Assignment of function parameter has no effect outside the function. Did you forget dereferencing it? [uselessAssignmentPtrArg]
src/treelearner/monotone_constraints.hpp:465:12: warning: Member variable 'LeafConstraintsBase::tree_' is not initialized in the constructor. Maybe it should be initialized directly in the class LeafConstraintsBase? [uninitDerivedMemberVar]
src/treelearner/feature_histogram.hpp:45:3: warning: Member variable 'FeatureHistogram::meta_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/col_sampler.hpp:22:12: warning: Member variable 'ColSampler::train_data_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/col_sampler.hpp:22:12: warning: Member variable 'ColSampler::need_reset_bytree_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/col_sampler.hpp:22:12: warning: Member variable 'ColSampler::used_cnt_bytree_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_partition.hpp:23:3: warning: Member variable 'DataPartition::used_data_count_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/leaf_splits.hpp:24:3: warning: Member variable 'LeafSplits::leaf_index_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/leaf_splits.hpp:24:3: warning: Member variable 'LeafSplits::sum_gradients_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/leaf_splits.hpp:24:3: warning: Member variable 'LeafSplits::sum_hessians_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < CUDATreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < CUDATreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < GPUTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < GPUTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < SerialTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/data_parallel_tree_learner.cpp:14:41: warning: Member variable 'DataParallelTreeLearner < SerialTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/monotone_constraints.hpp:184:5: performance: Variable 'thresholds_min_constraints' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:185:5: performance: Variable 'thresholds_max_constraints' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:186:5: performance: Variable 'cumulative_min_constraints_left_to_right' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:187:5: performance: Variable 'cumulative_min_constraints_right_to_left' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:188:5: performance: Variable 'cumulative_max_constraints_left_to_right' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:189:5: performance: Variable 'cumulative_max_constraints_right_to_left' is assigned in constructor body. Consider performing initialization in initialization list. [useInitializationList]
src/treelearner/monotone_constraints.hpp:946:27: style: Variable 'previous_constraint' is reassigned a value before the old one has been used. [redundantAssignment]
src/treelearner/monotone_constraints.hpp:884:12: style: The scope of the variable 'current_constraint' can be reduced. [variableScope]
src/treelearner/data_parallel_tree_learner.cpp:133:52: style: The scope of the variable 'p1' can be reduced. [variableScope]
src/treelearner/data_parallel_tree_learner.cpp:134:46: style: The scope of the variable 'p2' can be reduced. [variableScope]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < CUDATreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < CUDATreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < GPUTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < GPUTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < SerialTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/feature_parallel_tree_learner.cpp:14:44: warning: Member variable 'FeatureParallelTreeLearner < SerialTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/linear_tree_learner.h:21:12: warning: Member variable 'LinearTreeLearner::any_nan_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/ocl/histogram16.cl:15:1: error: syntax error [syntaxError]
src/treelearner/ocl/histogram256.cl:15:1: error: syntax error [syntaxError]
src/treelearner/ocl/histogram64.cl:15:1: error: syntax error [syntaxError]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::num_data_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::num_features_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::train_data_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::gradients_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::hessians_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::parent_leaf_histogram_array_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::smaller_leaf_histogram_array_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::larger_leaf_histogram_array_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:21:20: warning: Member variable 'SerialTreeLearner::forced_split_json_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/serial_tree_learner.cpp:730:28: style: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
src/treelearner/cost_effective_gradient_boosting.hpp:92:11: style: The scope of the variable 'ref_best_split_per_leaf' can be reduced. [variableScope]
src/treelearner/cost_effective_gradient_boosting.hpp:67:52: performance: Function parameter 'split_info' should be passed by const reference. [passedByValue]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < CUDATreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < CUDATreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < GPUTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < GPUTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < SerialTreeLearner >::rank_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:16:43: warning: Member variable 'VotingParallelTreeLearner < SerialTreeLearner >::num_machines_' is not initialized in the constructor. [uninitMemberVar]
src/treelearner/voting_parallel_tree_learner.cpp:105:52: style: The scope of the variable 'p1' can be reduced. [variableScope]
src/treelearner/voting_parallel_tree_learner.cpp:106:46: style: The scope of the variable 'p2' can be reduced. [variableScope]
nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingInclude]

@guolinke
Copy link
Collaborator

guolinke commented Mar 2, 2022

@shiyu1994 can you fix above warnings when have time?

@shiyu1994
Copy link
Collaborator

Sure. I can fix these step by step.

@jameslamb
Copy link
Collaborator Author

I am happy to continue helping with this as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants