mingw32 build: fix various warnings

This commit is contained in:
Alon Levy 2010-12-06 14:00:10 +02:00
parent f6cacd0e51
commit af1bfa6250
3 changed files with 7 additions and 7 deletions

View File

@ -88,7 +88,7 @@ bool EventSources::wait_events(int timeout_ms)
THROW("wait failed %d", GetLastError());
}
int event_index = wait_res - WAIT_OBJECT_0;
size_t event_index = wait_res - WAIT_OBJECT_0;
if (event_index == _handles.size()) {
return process_system_events();
} else if ((event_index >= 0) && (event_index < (int)_handles.size())) {

View File

@ -38,7 +38,7 @@ static void init_winsock()
}
}
char* version_string = "???";
const char* version_string = "???";
static char _version_string[40];
static void init_version_string()
@ -59,10 +59,10 @@ static void init_version_string()
return;
}
sprintf(_version_string, "%d.%d.%d.%d",
file_info->dwFileVersionMS >> 16,
file_info->dwFileVersionMS & 0x0ffff,
file_info->dwFileVersionLS >> 16,
file_info->dwFileVersionLS & 0x0ffff);
(int)(file_info->dwFileVersionMS >> 16),
(int)(file_info->dwFileVersionMS & 0x0ffff),
(int)(file_info->dwFileVersionLS >> 16),
(int)(file_info->dwFileVersionLS & 0x0ffff));
version_string = _version_string;
}

View File

@ -29,7 +29,7 @@ typedef HWND Window;
class CommandInfo {
public:
CommandInfo() : menu (0), command (NULL) {}
CommandInfo() : menu (0), command (0) {}
CommandInfo(Menu* in_menu, int in_command) : menu (in_menu), command (in_command) {}
Menu* menu;