Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Compiler error with gcc 4.7 (missing virtual d'tor) + fix #33

Open
philipbel opened this issue Aug 22, 2012 · 1 comment
Open

Compiler error with gcc 4.7 (missing virtual d'tor) + fix #33

philipbel opened this issue Aug 22, 2012 · 1 comment

Comments

@philipbel
Copy link

src/init.cpp:64:16: warning: deleting object of polymorphic class type ‘CWallet’ which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

Fix is:

diff --git a/src/keystore.h b/src/keystore.h
index 669bf90..9d6576d 100644
--- a/src/keystore.h
+++ b/src/keystore.h
@@ -15,6 +15,8 @@ protected:
     mutable CCriticalSection cs_KeyStore;

 public:
+    virtual ~CKeyStore() { };
+
     // Add a key to the store.
     virtual bool AddKey(const CKey& key) =0;
@laanwj
Copy link
Owner

laanwj commented Aug 22, 2012

Please file issues upstream at https://github.com/bitcoin/bitcoin.

This repository is no longer active.

Also, it has been solved there already.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants