@@ -137,14 +137,7 @@ class CPPCHECKLIB CheckMemoryLeak {
137137 */
138138 void resourceLeakError (const Token *tok, const std::string &varname) const ;
139139
140- /* *
141- * @brief Report error: deallocating a deallocated pointer
142- * @param tok token where error occurs
143- * @param varname name of variable
144- */
145- void deallocDeallocError (const Token *tok, const std::string &varname) const ;
146140 void deallocuseError (const Token *tok, const std::string &varname) const ;
147- void mismatchSizeError (const Token *tok, const std::string &sz) const ;
148141 void mismatchAllocDealloc (const std::list<const Token *> &callstack, const std::string &varname) const ;
149142 void memleakUponReallocFailureError (const Token *tok, const std::string &reallocfunction, const std::string &varname) const ;
150143
@@ -196,13 +189,9 @@ class CPPCHECKLIB CheckMemoryLeakInFunction : private Check, public CheckMemoryL
196189 /* * Report all possible errors (for the --errorlist) */
197190 void getErrorMessages (ErrorLogger *e, const Settings *settings) const override {
198191 CheckMemoryLeakInFunction c (nullptr , settings, e);
199-
200192 c.memleakError (nullptr , " varname" );
201193 c.resourceLeakError (nullptr , " varname" );
202-
203- c.deallocDeallocError (nullptr , " varname" );
204194 c.deallocuseError (nullptr , " varname" );
205- c.mismatchSizeError (nullptr , " sz" );
206195 const std::list<const Token *> callstack;
207196 c.mismatchAllocDealloc (callstack, " varname" );
208197 c.memleakUponReallocFailureError (nullptr , " realloc" , " varname" );
@@ -352,7 +341,6 @@ class CPPCHECKLIB CheckMemoryLeakNoVar : private Check, private CheckMemoryLeak
352341
353342 void getErrorMessages (ErrorLogger *e, const Settings *settings) const override {
354343 CheckMemoryLeakNoVar c (nullptr , settings, e);
355-
356344 c.functionCallLeak (nullptr , " funcName" , " funcName" );
357345 c.returnValueNotUsedError (nullptr , " funcName" );
358346 c.unsafeArgAllocError (nullptr , " funcName" , " shared_ptr" , " int" );
0 commit comments