summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-07-01 01:23:49 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-01 01:23:49 +0200
commit8b86306d48fff4a6cc9291d00e1211a5e5dc1903 (patch)
treec50b3a924821d9cf7f7ac789616fb9b26b8e2690
parentdd0752e69f33c6092a940091b8a332b18e6be76d (diff)
downloadMultiMC-8b86306d48fff4a6cc9291d00e1211a5e5dc1903.tar
MultiMC-8b86306d48fff4a6cc9291d00e1211a5e5dc1903.tar.gz
MultiMC-8b86306d48fff4a6cc9291d00e1211a5e5dc1903.tar.lz
MultiMC-8b86306d48fff4a6cc9291d00e1211a5e5dc1903.tar.xz
MultiMC-8b86306d48fff4a6cc9291d00e1211a5e5dc1903.zip
Handle a bunch more clang warnings
-rw-r--r--HandleCrash.cpp1
-rw-r--r--depends/quazip/unzip.c2
-rw-r--r--depends/quazip/zip.c4
-rw-r--r--gui/dialogs/IconPickerDialog.h3
-rw-r--r--gui/dialogs/ProgressDialog.h4
-rw-r--r--gui/pages/ScreenshotsPage.h2
-rw-r--r--gui/pages/VersionPage.cpp6
-rw-r--r--logic/BaseInstaller.h2
-rw-r--r--logic/BaseVersionList.h3
-rw-r--r--logic/InstanceFactory.h2
-rw-r--r--logic/VersionFilterData.cpp2
-rw-r--r--logic/assets/AssetsUtils.h2
-rw-r--r--logic/forge/ForgeInstaller.h2
-rw-r--r--logic/minecraft/VersionFile.h2
14 files changed, 19 insertions, 18 deletions
diff --git a/HandleCrash.cpp b/HandleCrash.cpp
index ed319cf1..cc2a5109 100644
--- a/HandleCrash.cpp
+++ b/HandleCrash.cpp
@@ -208,7 +208,6 @@ void dumpBacktrace(int dumpFile, CrashData crash)
void dumpSysInfo(int dumpFile)
{
#ifdef Q_OS_UNIX
- bool gotSysInfo = false; // True if system info check succeeded
utsname sysinfo; // System information
// Dump system info
diff --git a/depends/quazip/unzip.c b/depends/quazip/unzip.c
index 52bc081f..823e8504 100644
--- a/depends/quazip/unzip.c
+++ b/depends/quazip/unzip.c
@@ -1245,7 +1245,7 @@ extern int ZEXPORT unzReadCurrentFile (file, buf, len)
return UNZ_PARAMERROR;
- if ((pfile_in_zip_read_info->read_buffer == NULL))
+ if (pfile_in_zip_read_info->read_buffer == NULL)
return UNZ_END_OF_LIST_OF_FILE;
if (len==0)
return 0;
diff --git a/depends/quazip/zip.c b/depends/quazip/zip.c
index a36a20a1..9cb8dab7 100644
--- a/depends/quazip/zip.c
+++ b/depends/quazip/zip.c
@@ -777,9 +777,9 @@ extern int ZEXPORT zipOpenNewFileInZip3 (file, filename, zipfi,
zi->ci.flag = 0;
if ((level==8) || (level==9))
zi->ci.flag |= 2;
- if ((level==2))
+ if (level==2)
zi->ci.flag |= 4;
- if ((level==1))
+ if (level==1)
zi->ci.flag |= 6;
if (password != NULL)
{
diff --git a/gui/dialogs/IconPickerDialog.h b/gui/dialogs/IconPickerDialog.h
index f00c2388..70951da6 100644
--- a/gui/dialogs/IconPickerDialog.h
+++ b/gui/dialogs/IconPickerDialog.h
@@ -29,7 +29,10 @@ class IconPickerDialog : public QDialog
public:
explicit IconPickerDialog(QWidget *parent = 0);
~IconPickerDialog();
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Woverloaded-virtual"
int exec(QString selection);
+ #pragma clang diagnostic pop
QString selectedIconKey;
protected:
diff --git a/gui/dialogs/ProgressDialog.h b/gui/dialogs/ProgressDialog.h
index fe63a826..45a6238a 100644
--- a/gui/dialogs/ProgressDialog.h
+++ b/gui/dialogs/ProgressDialog.h
@@ -34,7 +34,11 @@ public:
void updateSize();
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Woverloaded-virtual"
int exec(ProgressProvider *task);
+ #pragma clang diagnostic pop
+
void setSkipButton(bool present, QString label = QString());
ProgressProvider *getTask();
diff --git a/gui/pages/ScreenshotsPage.h b/gui/pages/ScreenshotsPage.h
index 4098e5e4..78307f6a 100644
--- a/gui/pages/ScreenshotsPage.h
+++ b/gui/pages/ScreenshotsPage.h
@@ -27,7 +27,7 @@ namespace Ui
class ScreenshotsPage;
}
-class ScreenShot;
+struct ScreenShot;
class ScreenshotList;
class ImgurAlbumCreation;
diff --git a/gui/pages/VersionPage.cpp b/gui/pages/VersionPage.cpp
index 34599111..d3df5b46 100644
--- a/gui/pages/VersionPage.cpp
+++ b/gui/pages/VersionPage.cpp
@@ -214,10 +214,7 @@ void VersionPage::on_moveLibraryUpBtn_clicked()
try
{
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
- const int newRow = 0;
m_version->move(row, InstanceVersion::MoveUp);
- // ui->libraryTreeView->selectionModel()->setCurrentIndex(m_version->index(newRow),
- // QItemSelectionModel::ClearAndSelect);
}
catch (MMCError &e)
{
@@ -234,10 +231,7 @@ void VersionPage::on_moveLibraryDownBtn_clicked()
try
{
const int row = ui->libraryTreeView->selectionModel()->selectedRows().first().row();
- const int newRow = 0;
m_version->move(row, InstanceVersion::MoveDown);
- // ui->libraryTreeView->selectionModel()->setCurrentIndex(m_version->index(newRow),
- // QItemSelectionModel::ClearAndSelect);
}
catch (MMCError &e)
{
diff --git a/logic/BaseInstaller.h b/logic/BaseInstaller.h
index 9531fbff..d89ab7c2 100644
--- a/logic/BaseInstaller.h
+++ b/logic/BaseInstaller.h
@@ -22,7 +22,7 @@ class QDir;
class QString;
class QObject;
class ProgressProvider;
-class BaseVersion;
+struct BaseVersion;
typedef std::shared_ptr<BaseVersion> BaseVersionPtr;
class BaseInstaller
diff --git a/logic/BaseVersionList.h b/logic/BaseVersionList.h
index 21b44e8d..f903b52c 100644
--- a/logic/BaseVersionList.h
+++ b/logic/BaseVersionList.h
@@ -100,7 +100,10 @@ public:
/*!
* Sorts the version list.
*/
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Woverloaded-virtual"
virtual void sort() = 0;
+ #pragma clang diagnostic pop
protected
slots:
diff --git a/logic/InstanceFactory.h b/logic/InstanceFactory.h
index 96e2375e..32a31080 100644
--- a/logic/InstanceFactory.h
+++ b/logic/InstanceFactory.h
@@ -22,7 +22,7 @@
#include "BaseVersion.h"
#include "BaseInstance.h"
-class BaseVersion;
+struct BaseVersion;
class BaseInstance;
/*!
diff --git a/logic/VersionFilterData.cpp b/logic/VersionFilterData.cpp
index 8b521266..e8523018 100644
--- a/logic/VersionFilterData.cpp
+++ b/logic/VersionFilterData.cpp
@@ -1,7 +1,7 @@
#include "VersionFilterData.h"
#include "minecraft/ParseUtils.h"
-extern VersionFilterData g_VersionFilterData = VersionFilterData();
+VersionFilterData g_VersionFilterData = VersionFilterData();
VersionFilterData::VersionFilterData()
{
diff --git a/logic/assets/AssetsUtils.h b/logic/assets/AssetsUtils.h
index aaacc2db..5735afd0 100644
--- a/logic/assets/AssetsUtils.h
+++ b/logic/assets/AssetsUtils.h
@@ -18,8 +18,6 @@
#include <QString>
#include <QMap>
-class AssetObject;
-
struct AssetObject
{
QString hash;
diff --git a/logic/forge/ForgeInstaller.h b/logic/forge/ForgeInstaller.h
index 14aeeb51..1c7452d7 100644
--- a/logic/forge/ForgeInstaller.h
+++ b/logic/forge/ForgeInstaller.h
@@ -22,7 +22,7 @@
class InstanceVersion;
class ForgeInstallTask;
-class ForgeVersion;
+struct ForgeVersion;
class ForgeInstaller : public BaseInstaller
{
diff --git a/logic/minecraft/VersionFile.h b/logic/minecraft/VersionFile.h
index 186f4335..9a6c5d3c 100644
--- a/logic/minecraft/VersionFile.h
+++ b/logic/minecraft/VersionFile.h
@@ -12,7 +12,7 @@
#include "JarMod.h"
class InstanceVersion;
-struct VersionFile;
+class VersionFile;
typedef std::shared_ptr<VersionFile> VersionFilePtr;
class VersionFile : public VersionPatch