mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix some warnings
This commit is contained in:
parent
77ead17e29
commit
4809e62d18
|
@ -252,14 +252,14 @@ bool GBACheatParseFile(struct GBACheatDevice* device, struct VFile* vf) {
|
||||||
if (bytesRead < 0) {
|
if (bytesRead < 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
while (isspace(cheat[i])) {
|
while (isspace((int) cheat[i])) {
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
switch (cheat[i]) {
|
switch (cheat[i]) {
|
||||||
case '#':
|
case '#':
|
||||||
do {
|
do {
|
||||||
++i;
|
++i;
|
||||||
} while (isspace(cheat[i]));
|
} while (isspace((int) cheat[i]));
|
||||||
newSet = malloc(sizeof(*set));
|
newSet = malloc(sizeof(*set));
|
||||||
GBACheatSetInit(newSet, &cheat[i]);
|
GBACheatSetInit(newSet, &cheat[i]);
|
||||||
newSet->enabled = !nextDisabled;
|
newSet->enabled = !nextDisabled;
|
||||||
|
@ -278,7 +278,7 @@ bool GBACheatParseFile(struct GBACheatDevice* device, struct VFile* vf) {
|
||||||
case '!':
|
case '!':
|
||||||
do {
|
do {
|
||||||
++i;
|
++i;
|
||||||
} while (isspace(cheat[i]));
|
} while (isspace((int) cheat[i]));
|
||||||
if (strncasecmp(&cheat[i], "GSAv", 4) == 0 || strncasecmp(&cheat[i], "PARv", 4) == 0) {
|
if (strncasecmp(&cheat[i], "GSAv", 4) == 0 || strncasecmp(&cheat[i], "PARv", 4) == 0) {
|
||||||
i += 4;
|
i += 4;
|
||||||
gsaVersion = atoi(&cheat[i]);
|
gsaVersion = atoi(&cheat[i]);
|
||||||
|
@ -367,14 +367,14 @@ bool GBACheatAddLine(struct GBACheatSet* cheats, const char* line) {
|
||||||
if (!line) {
|
if (!line) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
while (isspace(line[0])) {
|
while (isspace((int) line[0])) {
|
||||||
++line;
|
++line;
|
||||||
}
|
}
|
||||||
line = hex16(line, &op2);
|
line = hex16(line, &op2);
|
||||||
if (!line) {
|
if (!line) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!line[0] || isspace(line[0])) {
|
if (!line[0] || isspace((int) line[0])) {
|
||||||
return GBACheatAddCodeBreaker(cheats, op1, op2);
|
return GBACheatAddCodeBreaker(cheats, op1, op2);
|
||||||
}
|
}
|
||||||
line = hex16(line, &op3);
|
line = hex16(line, &op3);
|
||||||
|
|
|
@ -113,7 +113,7 @@ bool GBAContextLoadBIOSFromVFile(struct GBAContext* context, struct VFile* bios)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GBAContextStart(struct GBAContext* context) {
|
bool GBAContextStart(struct GBAContext* context) {
|
||||||
struct GBAOptions opts = {};
|
struct GBAOptions opts = { .bios = 0 };
|
||||||
|
|
||||||
if (context->renderer) {
|
if (context->renderer) {
|
||||||
GBAVideoAssociateRenderer(&context->gba->video, context->renderer);
|
GBAVideoAssociateRenderer(&context->gba->video, context->renderer);
|
||||||
|
|
Loading…
Reference in New Issue