Fix some warnings
authorunc0rr
Wed, 05 Sep 2012 02:17:04 +0400
changeset 7671 43f38923bc6e
parent 7670 9485b88f6a44
child 7672 686ba86ae0e3
Fix some warnings
hedgewars/uAIActions.pas
hedgewars/uAIAmmoTests.pas
hedgewars/uCommandHandlers.pas
hedgewars/uGearsHandlers.pas
hedgewars/uGearsHedgehog.pas
hedgewars/uGearsRender.pas
hedgewars/uVideoRec.pas
--- a/hedgewars/uAIActions.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uAIActions.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -67,7 +67,7 @@
 procedure ProcessAction(var Actions: TActions; Me: PGear);
 
 implementation
-uses uAIMisc, uAI, uAmmos, uVariables, uCommands, uUtils, uDebug, uIO{$IFDEF TRACEAIACTIONS}, uConsole{$ENDIF};
+uses uAIMisc, uAI, uAmmos, uVariables, uCommands, uUtils, uIO{$IFDEF TRACEAIACTIONS}, uConsole{$ENDIF};
 
 var PrevX: LongInt = 0;
     timedelta: Longword = 0;
--- a/hedgewars/uAIAmmoTests.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uAIAmmoTests.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -123,7 +123,7 @@
 const BadTurn = Low(LongInt) div 4;
 
 implementation
-uses uAIMisc, uVariables, uUtils, uGearsHandlers, uCollisions;
+uses uAIMisc, uVariables, uUtils, uGearsHandlers;
 
 function Metric(x1, y1, x2, y2: LongInt): LongInt; inline;
 begin
--- a/hedgewars/uCommandHandlers.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uCommandHandlers.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -413,8 +413,7 @@
 end;
 
 procedure chNextTurn(var s: shortstring);
-var i: Longword;
-    gi: PGear;
+var gi: PGear;
 begin
     s:= s; // avoid compiler hint
 
--- a/hedgewars/uGearsHandlers.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uGearsHandlers.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -47,7 +47,6 @@
 var
     xx, yy, xxn, yyn: LongInt;
     dA: LongInt;
-    tdx, tdy: hwFloat;
 begin
     dA := hwSign(Gear^.dX);
     xx := dirs[Gear^.Angle].x;
--- a/hedgewars/uGearsHedgehog.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uGearsHedgehog.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -598,7 +598,6 @@
 ////////////////////////////////////////////////////////////////////////////////
 procedure PickUp(HH, Gear: PGear);
 var s: shortstring;
-    a: TAmmoType;
     i: LongInt;
     vga: PVisualGear;
     ag, gi: PGear;
--- a/hedgewars/uGearsRender.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uGearsRender.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -21,7 +21,7 @@
 unit uGearsRender;
 
 interface
-uses uTypes, uConsts, GLunit, uFloat, SDLh, uRandom;
+uses uTypes, uConsts, GLunit, uFloat, SDLh;
 
 procedure RenderGear(Gear: PGear; x, y: LongInt);
 
--- a/hedgewars/uVideoRec.pas	Wed Sep 05 02:11:51 2012 +0400
+++ b/hedgewars/uVideoRec.pas	Wed Sep 05 02:17:04 2012 +0400
@@ -36,7 +36,7 @@
 var flagPrerecording: boolean = false;
 
 function BeginVideoRecording: Boolean;
-function LoadNextCameraPosition(var newRealTicks, newGameTicks: LongInt): Boolean;
+function LoadNextCameraPosition(out newRealTicks, newGameTicks: LongInt): Boolean;
 procedure EncodeFrame;
 procedure StopVideoRecording;
 
@@ -191,7 +191,7 @@
     inc(numFrames);
 end;
 
-function LoadNextCameraPosition(var newRealTicks, newGameTicks: LongInt): Boolean;
+function LoadNextCameraPosition(out newRealTicks, newGameTicks: LongInt): Boolean;
 var frame: TFrame;
 begin
     // we need to skip or duplicate frames to match target framerate