All: Fix some warnings
Vicki Pfau vi@endrift.com
Mon, 06 May 2019 17:30:48 -0700
3 files changed,
4 insertions(+),
4 deletions(-)
M
src/core/cheats.c
→
src/core/cheats.c
@@ -230,7 +230,7 @@ for (d = 0; d < StringListSize(&directives); ++d) {
char directive[64]; ssize_t len = snprintf(directive, sizeof(directive) - 1, "!%s\n", *StringListGetPointer(&directives, d)); if (len > 1) { - vf->write(vf, directive, (size_t) len > sizeof(directive) ? sizeof(directive) : len); + vf->write(vf, directive, (size_t) len > sizeof(directive) ? sizeof(directive) : (size_t) len); } }
M
src/core/core.c
→
src/core/core.c
@@ -217,13 +217,13 @@ return success;
} struct VFile* mCoreGetState(struct mCore* core, int slot, bool write) { - char name[PATH_MAX]; + char name[PATH_MAX + 14]; // Quash warning snprintf(name, sizeof(name), "%s.ss%i", core->dirs.baseName, slot); return core->dirs.state->openFile(core->dirs.state, name, write ? (O_CREAT | O_TRUNC | O_RDWR) : O_RDONLY); } void mCoreDeleteState(struct mCore* core, int slot) { - char name[PATH_MAX]; + char name[PATH_MAX + 14]; // Quash warning snprintf(name, sizeof(name), "%s.ss%i", core->dirs.baseName, slot); core->dirs.state->deleteFile(core->dirs.state, name); }
M
src/core/library.c
→
src/core/library.c
@@ -341,7 +341,7 @@ sqlite3_step(library->insertPath);
} void mLibraryClear(struct mLibrary* library) { - int result = sqlite3_exec(library->db, + sqlite3_exec(library->db, " BEGIN TRANSACTION;" "\n DELETE FROM roots;" "\n DELETE FROM roms;"