mirror of https://github.com/mgba-emu/mgba.git
All: Fix some warnings
This commit is contained in:
parent
80930c80e5
commit
5c01f380fa
|
@ -977,7 +977,7 @@ static void _reportEntry(struct mDebugger* debugger, enum mDebuggerEntryReason r
|
|||
case DEBUGGER_ENTER_BREAKPOINT:
|
||||
if (info) {
|
||||
if (info->pointId > 0) {
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit breakpoint %zi at 0x%08X\n", info->pointId, info->address);
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit breakpoint %" PRIz "i at 0x%08X\n", info->pointId, info->address);
|
||||
} else {
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit unknown breakpoint at 0x%08X\n", info->address);
|
||||
}
|
||||
|
@ -988,9 +988,9 @@ static void _reportEntry(struct mDebugger* debugger, enum mDebuggerEntryReason r
|
|||
case DEBUGGER_ENTER_WATCHPOINT:
|
||||
if (info) {
|
||||
if (info->type.wp.accessType & WATCHPOINT_WRITE) {
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit watchpoint %zi at 0x%08X: (new value = 0x%08X, old value = 0x%08X)\n", info->pointId, info->address, info->type.wp.newValue, info->type.wp.oldValue);
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit watchpoint %" PRIz "i at 0x%08X: (new value = 0x%08X, old value = 0x%08X)\n", info->pointId, info->address, info->type.wp.newValue, info->type.wp.oldValue);
|
||||
} else {
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit watchpoint %zi at 0x%08X: (value = 0x%08X)\n", info->pointId, info->address, info->type.wp.oldValue);
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit watchpoint %" PRIz "i at 0x%08X: (value = 0x%08X)\n", info->pointId, info->address, info->type.wp.oldValue);
|
||||
}
|
||||
} else {
|
||||
cliDebugger->backend->printf(cliDebugger->backend, "Hit watchpoint\n");
|
||||
|
|
|
@ -526,7 +526,7 @@ static void _GBACoreReset(struct mCore* core) {
|
|||
if (gbacore->renderer.outputBuffer) {
|
||||
renderer = &gbacore->renderer.d;
|
||||
}
|
||||
int fakeBool;
|
||||
int fakeBool ATTRIBUTE_UNUSED;
|
||||
#if defined(BUILD_GLES2) || defined(BUILD_GLES3)
|
||||
if (gbacore->glRenderer.outputTex != (unsigned) -1 && mCoreConfigGetIntValue(&core->config, "hwaccelVideo", &fakeBool) && fakeBool) {
|
||||
renderer = &gbacore->glRenderer.d;
|
||||
|
|
|
@ -249,6 +249,9 @@ void mSDLDetachPlayer(struct mSDLEvents* events, struct mSDLPlayer* player) {
|
|||
}
|
||||
--events->playersAttached;
|
||||
CircleBufferDeinit(&player->rotation.zHistory);
|
||||
#if SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
CircleBufferDeinit(&player->rumble.history);
|
||||
#endif
|
||||
}
|
||||
|
||||
void mSDLPlayerLoadConfig(struct mSDLPlayer* context, const struct Configuration* config) {
|
||||
|
@ -352,10 +355,10 @@ void mSDLUpdateJoysticks(struct mSDLEvents* events, const struct Configuration*
|
|||
continue;
|
||||
}
|
||||
ssize_t joysticks[MAX_PLAYERS];
|
||||
size_t i;
|
||||
ssize_t i;
|
||||
// Pointers can get invalidated, so we'll need to refresh them
|
||||
for (i = 0; i < events->playersAttached && i < MAX_PLAYERS; ++i) {
|
||||
joysticks[i] = events->players[i]->joystick ? SDL_JoystickListIndex(&events->joysticks, events->players[i]->joystick) : SIZE_MAX;
|
||||
joysticks[i] = events->players[i]->joystick ? (ssize_t) SDL_JoystickListIndex(&events->joysticks, events->players[i]->joystick) : -1;
|
||||
events->players[i]->joystick = NULL;
|
||||
}
|
||||
struct SDL_JoystickCombo* joystick = SDL_JoystickListAppend(&events->joysticks);
|
||||
|
@ -366,7 +369,7 @@ void mSDLUpdateJoysticks(struct mSDLEvents* events, const struct Configuration*
|
|||
joystick->haptic = SDL_HapticOpenFromJoystick(joystick->joystick);
|
||||
#endif
|
||||
for (i = 0; i < events->playersAttached && i < MAX_PLAYERS; ++i) {
|
||||
if (joysticks[i] != SIZE_MAX) {
|
||||
if (joysticks[i] != -1) {
|
||||
events->players[i]->joystick = SDL_JoystickListGetPointer(&events->joysticks, joysticks[i]);
|
||||
}
|
||||
}
|
||||
|
@ -397,7 +400,11 @@ void mSDLUpdateJoysticks(struct mSDLEvents* events, const struct Configuration*
|
|||
continue;
|
||||
}
|
||||
events->players[i]->joystick = joystick;
|
||||
if (config && joystickName) {
|
||||
if (config
|
||||
#if !SDL_VERSION_ATLEAST(2, 0, 0)
|
||||
&& joystickName
|
||||
#endif
|
||||
) {
|
||||
mInputProfileLoad(events->players[i]->bindings, SDL_BINDING_BUTTON, config, joystickName);
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -44,7 +44,7 @@ static bool _dispatchExiting = false;
|
|||
int main(int argc, char** argv) {
|
||||
signal(SIGINT, _fuzzShutdown);
|
||||
|
||||
struct FuzzOpts fuzzOpts = { false, 0, 0, 0, 0 };
|
||||
struct FuzzOpts fuzzOpts = { false, 0, 0, 0 };
|
||||
struct mSubParser subparser = {
|
||||
.usage = FUZZ_USAGE,
|
||||
.parse = _parseFuzzOpts,
|
||||
|
|
Loading…
Reference in New Issue