mirror of https://github.com/mgba-emu/mgba.git
All: Fix several warnings
This commit is contained in:
parent
294470d940
commit
e7bbc60e79
|
@ -292,7 +292,7 @@ struct GBMemory {
|
|||
int currentSramBank1;
|
||||
uint8_t* sramBank1;
|
||||
|
||||
unsigned cartBusDecay;
|
||||
int cartBusDecay;
|
||||
uint16_t cartBusPc;
|
||||
uint8_t cartBus;
|
||||
|
||||
|
|
|
@ -219,7 +219,7 @@ static enum GBMemoryBankControllerType _detectUnlMBC(const uint8_t* mem, size_t
|
|||
if (cart->type == 0x01) { // Make sure we're not using a "fixed" version
|
||||
return GB_UNL_LI_CHENG;
|
||||
}
|
||||
if ((0x8000 << cart->romSize) != size) {
|
||||
if ((0x8000U << cart->romSize) != size) {
|
||||
return GB_UNL_LI_CHENG;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -1499,7 +1499,7 @@ bool EReaderScanCard(struct EReaderScan* scan) {
|
|||
size_t i;
|
||||
for (i = 0; i < blocks; ++i) {
|
||||
EReaderScanDetectBlockThreshold(scan, i);
|
||||
int errors = 36 * 36;
|
||||
unsigned errors = 36 * 36;
|
||||
while (!EReaderScanScanBlock(scan, i, true)) {
|
||||
if (errors < EReaderBlockListGetPointer(&scan->blocks, i)->errors) {
|
||||
return false;
|
||||
|
|
|
@ -1790,7 +1790,7 @@ void Window::setupMenu(QMenuBar* menubar) {
|
|||
|
||||
void Window::setupOptions() {
|
||||
ConfigOption* videoSync = m_config->addOption("videoSync");
|
||||
videoSync->connect([this](const QVariant& variant) {
|
||||
videoSync->connect([this](const QVariant&) {
|
||||
reloadConfig();
|
||||
}, this);
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ M_TEST_DEFINE(resizeMem) {
|
|||
}
|
||||
|
||||
M_TEST_DEFINE(resizeConstMem) {
|
||||
uint8_t bytes[32];
|
||||
uint8_t bytes[32] = {0};
|
||||
struct VFile* vf = VFileFromConstMemory(bytes, 32);
|
||||
assert_non_null(vf);
|
||||
assert_int_equal(vf->size(vf), 32);
|
||||
|
@ -96,7 +96,7 @@ M_TEST_DEFINE(resizeConstMem) {
|
|||
}
|
||||
|
||||
M_TEST_DEFINE(resizeMemChunk) {
|
||||
uint8_t bytes[32];
|
||||
uint8_t bytes[32] = {0};
|
||||
struct VFile* vf = VFileMemChunk(bytes, 32);
|
||||
assert_non_null(vf);
|
||||
assert_int_equal(vf->size(vf), 32);
|
||||
|
|
Loading…
Reference in New Issue