Commit 15a02376 authored by Urs Fleisch's avatar Urs Fleisch

Fix warnings reported by cppcheck.

cppcheck was called like this:
cppcheck --enable=all -UKID3_BUILD_GUI_LIB -UKID3_BUILD_CORE_LIB \
    -UKID3_BUILD_PLUGIN_LIB -UKID3_SHARED -UCFG_DOCDIR -UCFG_TRANSLATIONSDIR \
    -UQT_NO_DEBUG_STREAM -UQT_NO_DEPRECATED -UQT_NO_LIBRARY -UQT_NO_PROPERTIES \
    -UQT_NO_QOBJECT -UQT_NO_REGEXP -UQT_NO_REGULAREXPRESSION -UQT_NO_TRANSLATION \
    -UQT_NO_USERDATA -DHAVE_PHONON -DHAVE_READLINE -UQT_BOOTSTRAPPED -UQ_CC_MSVC \
    -UQT_DEBUG -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII \
    -UQT_USE_QSTRINGBUILDER -UQT_NO_DATASTREAM -UQT_NO_DATESTRING -DQT_NO_DEBUG -DQ_CC_GNU \
    -UQ_CC_MSVC -UQT_NO_COMPRESS -UQT_NO_TEXTCODEC -UQT_NO_THREAD -DQT_ASCII_CAST_WARNINGS \
    -UQT_BUILDING_QT -UQT_NO_DESKTOPSERVICES -UQT_NO_OPENVG -UQT_NO_GEOM_VARIANT \
    -UQT_NO_IMAGEFORMAT_JPEG \
    $(find src -type d -printf "-I%p ") -I/usr/include/x86_64-linux-gnu/qt5/QtDesigner \
    -I/usr/include/x86_64-linux-gnu/qt5/QtDeclarative -I/usr/include/x86_64-linux-gnu/qt5/QtScriptTools \
    -I/usr/include/x86_64-linux-gnu/qt5/QtSql \
    -I/usr/include/x86_64-linux-gnu/qt5/QtXml -I/usr/include/x86_64-linux-gnu/qt5/QtHelp \
    -I/usr/include/x86_64-linux-gnu/qt5/QtUiTools -I/usr/include/x86_64-linux-gnu/qt5/QtTest \
    -I/usr/include/x86_64-linux-gnu/qt5/QtScript -I/usr/include/x86_64-linux-gnu/qt5/QtSvg \
    -I/usr/include/x86_64-linux-gnu/qt5/QtWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtGui \
    -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I/usr/include/x86_64-linux-gnu/qt5/QtMultimedia \
    -I/usr/include/x86_64-linux-gnu/qt5/QtMultimediaWidgets -I/usr/include/x86_64-linux-gnu/qt5/QtQuick \
    -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -I/usr/include/taglib -I/usr/include/KDE \
    -I/usr/include/KF5/KConfigWidgets -I/usr/include/KF5/KConfigCore -I/usr/include/KF5/KXmlGui \
    $(find -name '*.cpp')
parent 9d6d95e6
......@@ -68,7 +68,7 @@ QVariant CheckableStringListModel::data(const QModelIndex& index, int role) cons
if (role == Qt::CheckStateRole &&
index.isValid() && index.column() == 0 &&
index.row() >= 0 && index.row() < 64) {
return m_bitMask & (1ULL << index.row()) ? Qt::Checked : Qt::Unchecked;
return (m_bitMask & (1ULL << index.row())) ? Qt::Checked : Qt::Unchecked;
}
return QStringListModel::data(index, role);
}
......
......@@ -42,7 +42,7 @@ public:
* @param operators additional operators (besides not, and, or),
* highest priority first
*/
ExpressionParser(QStringList operators);
explicit ExpressionParser(QStringList operators);
/**
* Destructor.
......
......@@ -33,7 +33,7 @@
* @param iconProvider icon provider to use
*/
PixmapProvider::PixmapProvider(TaggedFileIconProvider* iconProvider) :
m_fileIconProvider(iconProvider)
m_fileIconProvider(iconProvider), m_pixmapHash(0)
{
}
......
......@@ -49,7 +49,7 @@ class DSFHeader
/*!
* Parses an DSF header based on \a data.
*/
DSFHeader(const TagLib::ByteVector &data);
explicit DSFHeader(const TagLib::ByteVector &data);
/*!
* Does a shallow copy of \a h.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment