aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/CompilerWarnings.cmake4
-rw-r--r--launcher/java/JavaInstall.h6
-rw-r--r--launcher/minecraft/mod/ResourceFolderModel.h3
-rw-r--r--launcher/ui/widgets/VersionSelectWidget.h2
4 files changed, 10 insertions, 5 deletions
diff --git a/cmake/CompilerWarnings.cmake b/cmake/CompilerWarnings.cmake
index 69e57b4d..c9962c44 100644
--- a/cmake/CompilerWarnings.cmake
+++ b/cmake/CompilerWarnings.cmake
@@ -89,6 +89,10 @@ function(
-Wdouble-promotion # warn if float is implicit promoted to double
-Wformat=2 # warn on security issues around functions that format output (ie printf)
-Wimplicit-fallthrough # warn on statements that fallthrough without an explicit annotation
+ # -Wgnu-zero-variadic-macro-arguments (part of -pedantic) is triggered by every qCDebug() call and therefore results
+ # in a lot of noise. This warning is only notifying us that clang is emulating the GCC behaviour
+ # instead of the exact standard wording so we can safely ignore it
+ -Wno-gnu-zero-variadic-macro-arguments
)
endif()
diff --git a/launcher/java/JavaInstall.h b/launcher/java/JavaInstall.h
index 30815b5a..49e9ed06 100644
--- a/launcher/java/JavaInstall.h
+++ b/launcher/java/JavaInstall.h
@@ -24,11 +24,11 @@
struct JavaInstall : public BaseVersion {
JavaInstall() {}
JavaInstall(QString id, QString arch, QString path) : id(id), arch(arch), path(path) {}
- virtual QString descriptor() { return id.toString(); }
+ virtual QString descriptor() override { return id.toString(); }
- virtual QString name() { return id.toString(); }
+ virtual QString name() override { return id.toString(); }
- virtual QString typeString() const { return arch; }
+ virtual QString typeString() const override { return arch; }
virtual bool operator<(BaseVersion& a) override;
virtual bool operator>(BaseVersion& a) override;
diff --git a/launcher/minecraft/mod/ResourceFolderModel.h b/launcher/minecraft/mod/ResourceFolderModel.h
index 80c31e45..60b8879c 100644
--- a/launcher/minecraft/mod/ResourceFolderModel.h
+++ b/launcher/minecraft/mod/ResourceFolderModel.h
@@ -330,7 +330,8 @@ void ResourceFolderModel::applyUpdates(QSet<QString>& current_set, QSet<QString>
// When you have a Qt build with assertions turned on, proceeding here will abort the application
if (added_set.size() > 0) {
- beginInsertRows(QModelIndex(), m_resources.size(), m_resources.size() + added_set.size() - 1);
+ beginInsertRows(QModelIndex(), static_cast<int>(m_resources.size()),
+ static_cast<int>(m_resources.size() + added_set.size() - 1));
for (auto& added : added_set) {
auto res = new_resources[added];
diff --git a/launcher/ui/widgets/VersionSelectWidget.h b/launcher/ui/widgets/VersionSelectWidget.h
index 99729fbd..d5ef1cc9 100644
--- a/launcher/ui/widgets/VersionSelectWidget.h
+++ b/launcher/ui/widgets/VersionSelectWidget.h
@@ -82,7 +82,7 @@ class VersionSelectWidget : public QWidget {
void selectedVersionChanged(BaseVersion::Ptr version);
protected:
- virtual void closeEvent(QCloseEvent*);
+ virtual void closeEvent(QCloseEvent*) override;
private slots:
void onTaskSucceeded();