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