diff --git a/CMakeLists.txt b/CMakeLists.txt index d158b360d..8e435da1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ option(WITH_TESTS "Enable building of unit tests" ON) set( KEEPASSX_VERSION "0.9.0" ) -add_definitions(-DQT_NO_KEYWORDS -Wall) +add_definitions(-DQT_NO_KEYWORDS -fno-exceptions -fno-rtti -Wall -Wextra -Wundef -Wold-style-cast -Wnon-virtual-dtor) if( APPLE OR MINGW ) set( PROGNAME KeePassX ) diff --git a/src/crypto/Crypto.cpp b/src/crypto/Crypto.cpp index 9b8a79f20..bee190f81 100644 --- a/src/crypto/Crypto.cpp +++ b/src/crypto/Crypto.cpp @@ -50,11 +50,12 @@ int gcry_qt_mutex_unlock(void** p_sys) static const struct gcry_thread_cbs gcry_threads_qt = { GCRY_THREAD_OPTION_USER, - NULL, + 0, gcry_qt_mutex_init, gcry_qt_mutex_destroy, gcry_qt_mutex_lock, - gcry_qt_mutex_unlock + gcry_qt_mutex_unlock, + 0, 0, 0, 0, 0, 0, 0, 0 }; Crypto::Crypto() diff --git a/src/gui/GroupView.h b/src/gui/GroupView.h index dba703731..7d6f12492 100644 --- a/src/gui/GroupView.h +++ b/src/gui/GroupView.h @@ -29,7 +29,7 @@ class GroupView : public QTreeView Q_OBJECT public: - GroupView(Database* db, QWidget* parent = 0); + explicit GroupView(Database* db, QWidget* parent = 0); void setModel(QAbstractItemModel* model); Q_SIGNALS: diff --git a/src/keys/Key.h b/src/keys/Key.h index b80a6b7ee..d6d878918 100644 --- a/src/keys/Key.h +++ b/src/keys/Key.h @@ -23,6 +23,7 @@ class Key { public: + virtual ~Key() {} virtual QByteArray rawKey() const = 0; virtual Key* clone() const = 0; }; diff --git a/src/streams/HashedBlockStream.cpp b/src/streams/HashedBlockStream.cpp index c758fc4e9..ba4a563ce 100644 --- a/src/streams/HashedBlockStream.cpp +++ b/src/streams/HashedBlockStream.cpp @@ -135,7 +135,7 @@ bool HashedBlockStream::readHashedBlock() } if (m_blockSize == 0) { - if (hash.count(static_cast(0)) != 32) { + if (hash.count('\0') != 32) { // TODO error Q_ASSERT(false); return false;