-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
cfg: add library configuration for libselinux #6461
Conversation
Thanks for your contribution. You also need to install the library in the CI job in Also the configuration seems to have an unclosed comment. |
Done.
True, fixed. Any ideas for the above issues? |
This should depend on how |
It is reported if the const bool warn = [&]() {
if (tok->function() && (tok->function()->isAttributeNodiscard() || tok->function()->isAttributePure() || tok->function()->isAttributeConst()))
return true;
// avoid duplicate warnings for resource-allocating functions
if (retvalTy == Library::UseRetValType::DEFAULT) {
if (const Library::AllocFunc* info = mSettings->library.getAllocFuncInfo(tok))
return info->arg > 0;
}
return false;
}(); in |
Looks like |
test/cfg/runtests.sh
Outdated
@@ -449,26 +449,7 @@ function cppunit_fn { | |||
|
|||
# selinux.c | |||
function selinux_fn { | |||
if [ $HAS_PKG_CONFIG -eq 1 ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because libselinux does not make use of pkg-config
The FP involving |
Thanks; changed the argument direction in |
Maybe we should add include detection here: cppcheck/tools/donate_cpu_lib.py Line 680 in dc385f3
|
sorry is this related to this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me.
If we could detect the corresponding headers, we would automatically load the new library in daca (as far as I understand it). Same with the emscripten PR #6503 |
Those need to be disabled though if this library did not existing in the previous stable version or we will get a failure. Also please remember to bump the version of the script when changing it. |
So we should add it, but leave it commented out until 2.15 is released? |
Yes. |
There is a branch conflict now. |
This is also still missing the library detection in daca. |
Thanks. Please update |
AFAIK we intended to leave the detection commented out until 2.15 is released. Not sure if the version number needs to be bumped if there is no functional change. |
Good catch,
For this file I would prefer it to get an indication on how old the client actually is. |
Co-authored-by: Oliver Stöneberg <[email protected]>
@cgzones How do you wish to be credited in the Authors file? |
As 'Christian Göttsche'. Thanks for your support and this amazing tool in general. |
Done: 15bdd97 |
There are a couple false-positives and false-negatives:
no warning of
ignoredReturnValue
forget_default_type()
:wrong
constVariablePointer
report forselabel_open()
, especially since the cleanup functionselabel_close()
does take a not pointer to non-const:missing
memleak
forgetseuserbyname()
: