(svn r2651) - Fix: [ 1220776 ] Removes warning when compiling saveload.c on some GCC versions (glx). This only works as long as there is only 1 saving thread active, as is the case now.
authorDarkvater
Wed, 20 Jul 2005 15:36:22 +0000
changeset 2141 d3167783c73c
parent 2140 a04d0142ad65
child 2142 1aa9bebe39f3
(svn r2651) - Fix: [ 1220776 ] Removes warning when compiling saveload.c on some GCC versions (glx). This only works as long as there is only 1 saving thread active, as is the case now.
saveload.c
--- a/saveload.c	Wed Jul 20 15:29:28 2005 +0000
+++ b/saveload.c	Wed Jul 20 15:36:22 2005 +0000
@@ -1235,9 +1235,11 @@
 	const SaveLoadFormat *fmt = GetSavegameFormat(_savegame_format);
 	/* XXX - backup _sl.buf cause it is used internally by the writer
 	 * and we update it for our own purposes */
-	byte *tmp = _sl.buf;
+	static byte *tmp = NULL;
 	uint32 hdr[2];
 
+	tmp = _sl.buf;
+
 	SaveFileStart();
 
 	/* XXX - Setup setjmp error handler if an error occurs anywhere deep during