Skip to content

Commit

Permalink
Merge pull request #1537 from Trial97/warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrumplex committed Oct 4, 2023
2 parents d186c34 + d3acac1 commit 03ad430
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions cmake/CompilerWarnings.cmake
Expand Up @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions launcher/java/JavaInstall.h
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion launcher/minecraft/mod/ResourceFolderModel.h
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion launcher/ui/widgets/VersionSelectWidget.h
Expand Up @@ -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();
Expand Down

0 comments on commit 03ad430

Please sign in to comment.