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

Cppcheck: crashes table on OS X needs bounds check for stack_trace #2277

Closed
theopolis opened this issue Jul 21, 2016 · 0 comments
Closed

Cppcheck: crashes table on OS X needs bounds check for stack_trace #2277

theopolis opened this issue Jul 21, 2016 · 0 comments

Comments

@theopolis
Copy link
Member

See:

~/git/github/osquery (branch:master) » cppcheck -j 4 --error-exitcode=1 --enable=performance,warning -I ./include -q ./osquery
[osquery/filesystem/filesystem.cpp:82]: (performance) Variable 'dropper_' is assigned in constructor body. Consider performing initialization in initialization list.
[osquery/filesystem/windows/fileops.cpp:553] -> [osquery/filesystem/windows/fileops.cpp:559]: (performance) Variable 'ret' is reassigned a value before the old one has been used.
[osquery/filesystem/windows/fileops.cpp:1132] -> [osquery/filesystem/windows/fileops.cpp:1133]: (performance) Variable 'handle' is reassigned a value before the old one has been used.
[osquery/logger/plugins/tls.cpp:51]: (performance) Variable 'uri_' is assigned in constructor body. Consider performing initialization in initialization list.
[osquery/remote/transports/tls.cpp:166]: (performance) Inefficient usage of string::find() in condition; string::compare() would be faster.
[osquery/tables/system/darwin/crashes.cpp:81] -> [osquery/tables/system/darwin/crashes.cpp:70]: (warning) Missing bounds check for extra iterator increment in loop.
[osquery/tables/system/darwin/smc_keys.cpp:648] -> [osquery/tables/system/darwin/smc_keys.cpp:651]: (performance) Variable 'category' is reassigned a value before the old one has been used.
[osquery/tables/system/darwin/smc_keys.cpp:651] -> [osquery/tables/system/darwin/smc_keys.cpp:654]: (performance) Variable 'category' is reassigned a value before the old one has been used.
[osquery/tables/system/windows/system_util.cpp:95] -> [osquery/tables/system/windows/system_util.cpp:97]: (performance) Variable 'hr' is reassigned a value before the old one has been used.
[osquery/tables/system/windows/system_util.cpp:97] -> [osquery/tables/system/windows/system_util.cpp:98]: (performance) Variable 'hr' is reassigned a value before the old one has been used.
[osquery/tables/system/windows/system_util.cpp:98] -> [osquery/tables/system/windows/system_util.cpp:101]: (performance) Variable 'hr' is reassigned a value before the old one has been used.

The only WARNING: osquery/tables/system/darwin/crashes.cpp:81.

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

2 participants