Eliminate some warnings from NDS specific code.

svn-id: r35157
This commit is contained in:
Robin Watts 2008-11-23 11:49:58 +00:00
parent fc507e9874
commit f897def64d
3 changed files with 12 additions and 7 deletions

View File

@ -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;
}

View File

@ -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':

View File

@ -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];
}