Merge pull request #2688 from jpyllman/fix_chklibfunc
not report locally declared functions as missing configuration of --check-library
This commit is contained in:
commit
c3749625f3
|
@ -436,6 +436,9 @@ void CheckFunctions::checkLibraryMatchFunctions()
|
|||
if (tok->linkAt(1)->strAt(1) == "(")
|
||||
continue;
|
||||
|
||||
if (tok->function())
|
||||
continue;
|
||||
|
||||
if (!mSettings->library.isNotLibraryFunction(tok))
|
||||
continue;
|
||||
|
||||
|
|
|
@ -364,15 +364,11 @@ public:
|
|||
|
||||
void MacroTest2_test()
|
||||
{
|
||||
// TODO: remove suppression when #9002 is fixed
|
||||
// cppcheck-suppress checkLibraryFunction
|
||||
QString str = MacroTest2::tr("hello");
|
||||
QByteArray ba = str.toLatin1();
|
||||
printf(ba.data());
|
||||
|
||||
#ifndef QT_NO_DEPRECATED
|
||||
// TODO: remove suppression when #9002 is fixed
|
||||
// cppcheck-suppress checkLibraryFunction
|
||||
str = MacroTest2::trUtf8("test2");
|
||||
ba = str.toLatin1();
|
||||
printf(ba.data());
|
||||
|
|
|
@ -3882,7 +3882,6 @@ void valid_vsprintf_helper(const char * format, ...)
|
|||
void valid_vsprintf()
|
||||
{
|
||||
// buffer will contain "2\0" => no bufferAccessOutOfBounds
|
||||
// cppcheck-suppress checkLibraryFunction
|
||||
// cppcheck-suppress checkLibraryNoReturn
|
||||
valid_vsprintf_helper("%1.0f", 2.0f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue