changeset 8:64a1159dabe3 draft

(svn r9) Fixed a couple of warnings and minor coding issues
author dominik <dominik@openttd.org>
date Tue, 10 Aug 2004 16:34:01 +0000
parents 9f574a7877d4
children 138e2218dfef
files namegen.c network.c ttd.c w32dm.c win32.c
diffstat 5 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/namegen.c
+++ b/namegen.c
@@ -1977,7 +1977,6 @@
 
 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 */
--- a/network.c
+++ b/network.c
@@ -1173,7 +1173,7 @@
 }
 
 
-#else // ENABLE_NETWORK
+#else // not ENABLE_NETWORK
 
 // stubs
 void NetworkInitialize(const char *hostname) {}
@@ -1187,5 +1187,5 @@
 void NetworkStartSync() {}
 void NetworkUDPListen(int port) {}
 void NetworkUDPReceive() {}
-bool NetworkUDPSearchServer() {}
+bool NetworkUDPSearchServer() { return false; }
 #endif // ENABLE_NETWORK
--- a/ttd.c
+++ b/ttd.c
@@ -491,7 +491,7 @@
 		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++;
 				}
--- a/w32dm.c
+++ b/w32dm.c
@@ -111,4 +111,4 @@
 	SetVolume(vol);
 }
 
-#endif
\ No newline at end of file
+#endif
--- a/win32.c
+++ b/win32.c
@@ -562,7 +562,7 @@
 }
 
 
-static char *Win32GdiStart(char **parm)
+static const char *Win32GdiStart(char **parm)
 {
 	memset(&_wnd, 0, sizeof(_wnd));
 	_wnd.cursor_visible = true;