test25.cpp: In member function 'int Object1::test1(Data1*)': test25.cpp:37:9: warning: Useless variable check 'ptr1'. It already was checked before if (ptr1) ^ test25.cpp: In member function 'void Object1::func1(Data1*)': test25.cpp:45:22: warning: null argument where non-null required (argument 2) [-Wnonnull] test1(nullptr); ^ test25.cpp: In member function 'void Object1::func2(Data1*)': test25.cpp:50:14: warning: warning: possible null argument 'ptr1' where non-null required test1(ptr1); ^