testing/cxxtest: Fix the compiler warning

cxxtest_main.cxx: In function ‘void test_rtti()’:
cxxtest_main.cxx:199:3: warning: deleting object of polymorphic class type ‘Base’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
  199 |   delete a;
      |   ^~~~~~~~
cxxtest_main.cxx:200:3: warning: deleting object of polymorphic class type ‘Base’ which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
  200 |   delete b;

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id80100a09f7b1d5931e7898a1a5a75ca00007c75
This commit is contained in:
Xiang Xiao 2020-07-06 15:17:18 +08:00 committed by Abdelatif Guettouche
parent 7789bbb470
commit 278c9fe5f5

View File

@ -56,7 +56,8 @@ using namespace std;
class Base
{
public:
virtual void printBase(void) {};
virtual void printBase(void) {}
virtual ~Base() {}
};
class Extend : public Base