summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-12-23 20:23:05 +0000
committerdarkvater <darkvater@openttd.org>2004-12-23 20:23:05 +0000
commitffed7d6834dfd4d6f7f980b73e485a83f29cdcd9 (patch)
treeca01fb3e24b11a8cf374a38ff96a7b3a688eeeaa
parentc330e4203e21a6bf9a8415d525bd5e513fdd913d (diff)
downloadopenttd-ffed7d6834dfd4d6f7f980b73e485a83f29cdcd9.tar.xz
(svn r1262) -Fix: [1088996] kill some warnings for MinGW (luzi82)
-rw-r--r--airport_gui.c9
-rw-r--r--network_core.h6
-rw-r--r--win32.c4
3 files changed, 9 insertions, 10 deletions
diff --git a/airport_gui.c b/airport_gui.c
index 235cb7494..fea726ef6 100644
--- a/airport_gui.c
+++ b/airport_gui.c
@@ -122,11 +122,10 @@ void ShowBuildAirToolbar()
static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
{
- int rad;
-
switch(e->event) {
case WE_PAINT: {
int sel;
+ int rad = 4; // default catchment radious
if (WP(w,def_d).close)
return;
@@ -154,12 +153,8 @@ static void BuildAirportPickerWndProc(Window *w, WindowEvent *e)
case AT_LARGE: rad = CA_AIR_LARGE; break;
case AT_METROPOLITAN: rad = CA_AIR_METRO; break;
case AT_INTERNATIONAL: rad = CA_AIR_INTER; break;
- default: rad = 4; break;
}
- } else {
- rad = 4;
- }
-
+ }
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad);
diff --git a/network_core.h b/network_core.h
index c426b1957..d6a408c33 100644
--- a/network_core.h
+++ b/network_core.h
@@ -12,7 +12,11 @@
# include <windows.h>
# include <winsock2.h>
# include <ws2tcpip.h>
-# pragma comment (lib, "ws2_32.lib")
+
+#ifdef _MSC_VER
+#pragma comment (lib, "ws2_32.lib")
+#endif //_MSC_VER
+
# define ENABLE_NETWORK // On windows, the network is always enabled
# define GET_LAST_ERROR() WSAGetLastError()
# define EWOULDBLOCK WSAEWOULDBLOCK
diff --git a/win32.c b/win32.c
index 98102760f..8e07c41d1 100644
--- a/win32.c
+++ b/win32.c
@@ -1533,7 +1533,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
if (h != INVALID_HANDLE_VALUE) {
do {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
- !(fd.cFileName[0]=='.' && (fd.cFileName[1]==0 || fd.cFileName[1]=='.' && fd.cFileName[2]==0))) {
+ !(fd.cFileName[0] == '.' && (fd.cFileName[1] == 0 || (fd.cFileName[1] == '.' && fd.cFileName[2] == 0)))) {
fios = FiosAlloc();
fios->type = FIOS_TYPE_DIR;
strcpy(fios->name, fd.cFileName);
@@ -1631,7 +1631,7 @@ FiosItem *FiosGetScenarioList(int *num, int mode)
if (h != INVALID_HANDLE_VALUE && mode != SLD_NEW_GAME) {
do {
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&
- !(fd.cFileName[0]=='.' && (fd.cFileName[1]==0 || fd.cFileName[1]=='.' && fd.cFileName[2]==0))) {
+ !(fd.cFileName[0] == '.' && (fd.cFileName[1] == 0 || (fd.cFileName[1] == '.' && fd.cFileName[2] == 0)))) {
fios = FiosAlloc();
fios->type = FIOS_TYPE_DIR;
strcpy(fios->name, fd.cFileName);