Kaydet (Commit) 88738347 authored tarafından Julien Nabet's avatar Julien Nabet

cppcheck: incorrectStringBooleanError

Change-Id: I7f4bce8444c6c022d856d20b06de4a4834148ea2
Reviewed-on: https://gerrit.libreoffice.org/64834Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
Tested-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst c56b2e3f
...@@ -231,8 +231,8 @@ class Foo18 { ...@@ -231,8 +231,8 @@ class Foo18 {
void foo19() void foo19()
{ {
std::vector<char*> vec; // expected-note {{var is here [loplugin:useuniqueptr]}} std::vector<char*> vec; // expected-note {{var is here [loplugin:useuniqueptr]}}
for(char * p : vec) for(char * p : vec) // expected-note {{var is here [loplugin:useuniqueptr]}}
delete p; // expected-error {{rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]}} delete p; // expected-error {{rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]}} expected-error {{call to delete on a var, should be using std::unique_ptr [loplugin:useuniqueptr]}}
} }
// no warning expected // no warning expected
......
...@@ -511,7 +511,7 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C ...@@ -511,7 +511,7 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C
|| name == "StgDirEntry::SetSize" || name == "UCBStorage::CopyStorageElement_Impl" || name == "StgDirEntry::SetSize" || name == "UCBStorage::CopyStorageElement_Impl"
|| parentName == "SfxItemSet" || parentName == "SfxItemPool" || parentName == "SfxItemSet" || parentName == "SfxItemPool"
|| name == "OutputDevice::ImplDrawPolyPolygon" || name == "OutputDevice::ImplDrawPolyPolygon" || name == "OutputDevice::ImplDrawPolyPolygon" || name == "OutputDevice::ImplDrawPolyPolygon"
|| name == "ImplListBox::InsertEntry" || "Edit::dispose") || name == "ImplListBox::InsertEntry" || name == "Edit::dispose")
return; return;
// very dodgy // very dodgy
if (name == "UCBStorage::OpenStorage_Impl") if (name == "UCBStorage::OpenStorage_Impl")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment