diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/fs/ds/ds-fs.cpp | 4 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/scummconsole.c | 7 | ||||
-rw-r--r-- | backends/platform/ds/arm9/source/touchkeyboard.cpp | 8 |
3 files changed, 12 insertions, 7 deletions
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp index 17a06f4229..dda176bbcc 100644 --- a/backends/fs/ds/ds-fs.cpp +++ b/backends/fs/ds/ds-fs.cpp @@ -567,7 +567,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) { return numItems; } else { // consolePrintf("Read past end of file: %d read out of %d\n", bytes / size, numItems); - if (bytes != size * numItems) readPastEndOfFile = true; + if ((size_t)bytes != size * numItems) readPastEndOfFile = true; return bytes / size; } return numItems; @@ -588,7 +588,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) { return bytes / size; } - if (handle->pos + size * numItems > handle->size) { + if ((size_t)(handle->pos + size * numItems) > handle->size) { numItems = (handle->size - handle->pos) / size; if (numItems < 0) numItems = 0; } diff --git a/backends/platform/ds/arm9/source/scummconsole.c b/backends/platform/ds/arm9/source/scummconsole.c index f4ae0bca8b..aafa0f7744 100644 --- a/backends/platform/ds/arm9/source/scummconsole.c +++ b/backends/platform/ds/arm9/source/scummconsole.c @@ -498,7 +498,12 @@ int consolePrintf(const char* s, ...) break; case 'f': case 'F': - printF(w,va_arg(argp, double)); +/* Need to undo our 'all doubles are floats' definition */ +#define TEMP_DEF double +#undef double + printF(w,va_arg(argp, double)); +#define double TEMP_DEF +#undef TEMP_DEF s++; break; case 's': diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 17c6a5bc3d..81f0e40010 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -169,7 +169,7 @@ void restoreVRAM(int tileBase, int mapBase, u16* saveSpace) { } void drawKeyboard(int tileBase, int mapBase, u16* saveSpace) { - int keyboardDataSize = 4736 * 2; + /* int keyboardDataSize = 4736 * 2; */ for (int r = 0; r < 32 * 32; r++) { // *saveSpace++ = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r]; @@ -263,7 +263,7 @@ void drawAutoComplete() { int y = 12 + (r % 6) * 2; int x = 0 + ((r / 6) * 16); - for (int p = 0; p < strlen(autoCompleteWord[r]); p++) { + for (int p = 0; p < (int)strlen(autoCompleteWord[r]); p++) { char c = autoCompleteWord[r][p]; int tile = c - 33 + (KEYBOARD_DATA_SIZE / 32); @@ -317,7 +317,7 @@ void clearAutoComplete() { void typeCompletion(int current) { Common::Event event; - OSystem_DS* system = OSystem_DS::instance(); + /* OSystem_DS* system = OSystem_DS::instance(); */ strcat(autoCompleteBuffer, &autoCompleteWord[current][charactersEntered]); strcat(autoCompleteBuffer, " "); @@ -361,7 +361,7 @@ void updateTypeEvents() event.type = Common::EVENT_KEYUP; system->addEvent(event); - for (int r = 0; r < strlen(autoCompleteBuffer); r++) + for (int r = 0; r < (int)strlen(autoCompleteBuffer); r++) { autoCompleteBuffer[r] = autoCompleteBuffer[r + 1]; } |