From: Ketmar Dark Date: Sat, 15 Sep 2018 21:42:57 +0000 (+0300) Subject: fixed two compiler warnings (one is definitely false positive, but meh...) X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=42e251585e2584512ddf4049431e5e0faec3a860;p=d2df-sdl.git fixed two compiler warnings (one is definitely false positive, but meh...) --- diff --git a/src/game/g_game.pas b/src/game/g_game.pas index 7f6fa0a..fec21e4 100644 --- a/src/game/g_game.pas +++ b/src/game/g_game.pas @@ -1478,6 +1478,7 @@ function GetRandomSpectMode(Current: Byte): Byte; label retry; begin + Result := Current; retry: case Random(7) of 0: Result := SPECT_STATS; diff --git a/src/game/g_netmaster.pas b/src/game/g_netmaster.pas index 58667c9..4137d8b 100644 --- a/src/game/g_netmaster.pas +++ b/src/game/g_netmaster.pas @@ -476,6 +476,20 @@ end; function GetServerFromTable(Index: Integer; SL: TNetServerList; ST: TNetServerTable): TNetServer; begin + Result.Number := 0; + Result.Protocol := 0; + Result.Name := ''; + Result.IP := ''; + Result.Port := 0; + Result.Map := ''; + Result.Players := 0; + Result.MaxPlayers := 0; + Result.LocalPl := 0; + Result.Bots := 0; + Result.Ping := 0; + Result.GameMode := 0; + Result.Password := false; + FillChar(Result.PingAddr, SizeOf(ENetAddress), 0); if ST = nil then Exit; if (Index < 0) or (Index >= Length(ST)) then