From ff4bb3cd775f3a9276f61c9c7502de7209a777f2 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Fri, 1 Oct 2021 13:57:46 -0230 Subject: [PATCH] Fixed minor warnings with clang 13. --- Makefile | 4 ++-- src/emucore/CartE7.cxx | 2 +- src/emucore/CartE7.hxx | 2 +- src/emucore/QuadTari.cxx | 2 +- src/emucore/QuadTari.hxx | 2 +- src/gui/PlusRomsSetupDialog.cxx | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 727c8ea40..205af0579 100644 --- a/Makefile +++ b/Makefile @@ -61,11 +61,11 @@ ifdef HAVE_CLANG endif ifdef CLANG_WARNINGS - EXTRA_WARN=-Weverything -Wno-c++98-compat-pedantic \ + EXTRA_WARN=-Weverything -Wno-c++98-compat-pedantic -Wno-unknown-warning-option \ -Wno-switch-enum -Wno-conversion -Wno-covered-switch-default \ -Wno-inconsistent-missing-destructor-override -Wno-float-equal \ -Wno-exit-time-destructors -Wno-global-constructors -Wno-weak-vtables \ - -Wno-four-char-constants -Wno-padded + -Wno-four-char-constants -Wno-padded -Wno-reserved-identifier CXXFLAGS+= $(EXTRA_WARN) CFLAGS+= $(EXTRA_WARN) diff --git a/src/emucore/CartE7.cxx b/src/emucore/CartE7.cxx index 24dbfbcdd..89bba714c 100644 --- a/src/emucore/CartE7.cxx +++ b/src/emucore/CartE7.cxx @@ -20,7 +20,7 @@ // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CartridgeE7::CartridgeE7(const ByteBuffer& image, size_t size, - const string& md5, const Settings& settings) + const string& md5, const Settings& settings) : Cartridge(settings, md5), mySize{size} { diff --git a/src/emucore/CartE7.hxx b/src/emucore/CartE7.hxx index 5cecafa39..e833d54a8 100644 --- a/src/emucore/CartE7.hxx +++ b/src/emucore/CartE7.hxx @@ -76,7 +76,7 @@ class CartridgeE7 : public Cartridge @param settings A reference to the various settings (read-only) */ CartridgeE7(const ByteBuffer& image, size_t size, const string& md5, - const Settings& settings); + const Settings& settings); ~CartridgeE7() override = default; public: diff --git a/src/emucore/QuadTari.cxx b/src/emucore/QuadTari.cxx index b241b2100..ce828aa05 100644 --- a/src/emucore/QuadTari.cxx +++ b/src/emucore/QuadTari.cxx @@ -108,7 +108,7 @@ unique_ptr QuadTari::addController(const Controller::Type type, bool } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool QuadTari::isFirst() +bool QuadTari::isFirst() const { constexpr int MIN_CYCLES = 76; // minimal cycles required for stable input switch (just to be safe) diff --git a/src/emucore/QuadTari.hxx b/src/emucore/QuadTari.hxx index fb930e450..e176b3076 100644 --- a/src/emucore/QuadTari.hxx +++ b/src/emucore/QuadTari.hxx @@ -107,7 +107,7 @@ class QuadTari : public Controller private: // determine which controller is active - bool isFirst(); + bool isFirst() const; unique_ptr addController(const Controller::Type type, bool second); diff --git a/src/gui/PlusRomsSetupDialog.cxx b/src/gui/PlusRomsSetupDialog.cxx index d99f02eda..561cd4907 100644 --- a/src/gui/PlusRomsSetupDialog.cxx +++ b/src/gui/PlusRomsSetupDialog.cxx @@ -47,7 +47,7 @@ void PlusRomsSetupDialog::loadConfig() const char* HEX_DIGITS = "0123456789ABCDEF"; char id_chr[ID_LEN]; - srand(time(NULL)); + srand(time(nullptr)); for(int i = 0; i < ID_LEN; i++) id_chr[i] = HEX_DIGITS[(rand() % 16)];