Mercurial > hg > openttd
changeset 4016:abe85db26ff9 draft
(svn r5229) Remove a write-only variable
author | glx <glx@openttd.org> |
---|---|
date | Sun, 11 Jun 2006 21:38:35 +0000 |
parents | 58152fe284d0 |
children | 301ff669a2e6 |
files | saveload.c |
diffstat | 1 files changed, 2 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/saveload.c +++ b/saveload.c @@ -1464,7 +1464,6 @@ { uint32 hdr[2]; const SaveLoadFormat *fmt; - uint version; /* An instance of saving is already active, so don't go saving again */ if (_ts.saveinprogress && mode == SL_SAVE) { @@ -1515,10 +1514,6 @@ return SL_ERROR; } - /* We first initialize here to avoid: "warning: variable `version' might - * be clobbered by `longjmp' or `vfork'" */ - version = 0; - /* General tactic is to first save the game to memory, then use an available writer * to write it to file, either in threaded mode if possible, or single-threaded */ if (mode == SL_SAVE) { /* SAVE game */ @@ -1557,7 +1552,7 @@ if (fmt == endof(_saveload_formats)) { DEBUG(misc, 0) ("[Sl] Unknown savegame type, trying to load it as the buggy format."); rewind(_sl.fh); - _sl_version = version = 0; + _sl_version = 0; _sl_minor_version = 0; fmt = _saveload_formats + 1; // LZO break; @@ -1565,7 +1560,7 @@ if (fmt->tag == hdr[0]) { // check version number - _sl_version = version = TO_BE32(hdr[1]) >> 16; + _sl_version = TO_BE32(hdr[1]) >> 16; /* Minor is not used anymore from version 18.0, but it is still needed * in versions before that (4 cases) which can't be removed easy. * Therefor it is loaded, but never saved (or, it saves a 0 in any scenario).