Enable and fix more warnings.

This commit is contained in:
Felix Geyer 2010-09-18 20:31:14 +02:00
parent 5da7d3fca6
commit 1678351d11
5 changed files with 7 additions and 5 deletions

View File

@ -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 )

View File

@ -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()

View File

@ -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:

View File

@ -23,6 +23,7 @@
class Key
{
public:
virtual ~Key() {}
virtual QByteArray rawKey() const = 0;
virtual Key* clone() const = 0;
};

View File

@ -135,7 +135,7 @@ bool HashedBlockStream::readHashedBlock()
}
if (m_blockSize == 0) {
if (hash.count(static_cast<char>(0)) != 32) {
if (hash.count('\0') != 32) {
// TODO error
Q_ASSERT(false);
return false;