From 6c87ef6c65c1f520f1f471ded8e0a1fb7c4fb3a2 Mon Sep 17 00:00:00 2001 From: dominik Date: Tue, 10 Aug 2004 16:34:01 +0000 Subject: (svn r9) Fixed a couple of warnings and minor coding issues --- namegen.c | 1 - network.c | 4 ++-- ttd.c | 2 +- w32dm.c | 2 +- win32.c | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/namegen.c b/namegen.c index 9ae5c7516..9b0829ff3 100644 --- a/namegen.c +++ b/namegen.c @@ -1977,7 +1977,6 @@ TownNameGenerator * const _town_name_generators[] = { uint32 GetOldTownName(uint32 townnameparts, byte old_town_name_type) { - uint32 a = 0; switch (old_town_name_type) { case 0: case 3: /* English, American */ /* Already OK */ diff --git a/network.c b/network.c index dd32030d9..4ddf34fca 100644 --- a/network.c +++ b/network.c @@ -1173,7 +1173,7 @@ bool NetworkUDPSearchServer() { } -#else // ENABLE_NETWORK +#else // not ENABLE_NETWORK // stubs void NetworkInitialize(const char *hostname) {} @@ -1187,5 +1187,5 @@ void NetworkProcessCommands() {} void NetworkStartSync() {} void NetworkUDPListen(int port) {} void NetworkUDPReceive() {} -bool NetworkUDPSearchServer() {} +bool NetworkUDPSearchServer() { return false; } #endif // ENABLE_NETWORK diff --git a/ttd.c b/ttd.c index 7e59aa96e..78ee234b3 100644 --- a/ttd.c +++ b/ttd.c @@ -491,7 +491,7 @@ int ttd_main(int argc, char* argv[]) case 'v': ttd_strlcpy(videodriver, mgo.opt, sizeof(videodriver)); break; case 'n': { network = 1; - if ((bool)mgo.opt) { + if (mgo.opt) { network_conn = mgo.opt; network++; } diff --git a/w32dm.c b/w32dm.c index 7c7dbbb9f..2a6036fe4 100644 --- a/w32dm.c +++ b/w32dm.c @@ -111,4 +111,4 @@ static void DMusicMidiSetVolume(byte vol) SetVolume(vol); } -#endif \ No newline at end of file +#endif diff --git a/win32.c b/win32.c index c206533bd..462230823 100644 --- a/win32.c +++ b/win32.c @@ -562,7 +562,7 @@ static void FindResolutions() } -static char *Win32GdiStart(char **parm) +static const char *Win32GdiStart(char **parm) { memset(&_wnd, 0, sizeof(_wnd)); _wnd.cursor_visible = true; -- cgit v1.2.3-70-g09d2