Fixed minor warnings with clang 13.

This commit is contained in:
Stephen Anthony 2021-10-01 13:57:46 -02:30
parent 208e7e3075
commit ff4bb3cd77
6 changed files with 7 additions and 7 deletions

View File

@ -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)

View File

@ -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}
{

View File

@ -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:

View File

@ -108,7 +108,7 @@ unique_ptr<Controller> 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)

View File

@ -107,7 +107,7 @@ class QuadTari : public Controller
private:
// determine which controller is active
bool isFirst();
bool isFirst() const;
unique_ptr<Controller> addController(const Controller::Type type, bool second);

View File

@ -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)];