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::func2(Data1*)': test25.cpp:50:14: warning: warning: possible null argument 'ptr1' where non-null required test1(ptr1); ^