Просмотр исходного кода

* Removed unused vars in RTL.

git-svn-id: trunk@31750 -
yury 10 лет назад
Родитель
Сommit
e1a0b1204a

+ 2 - 0
rtl/arm/mathu.inc

@@ -450,8 +450,10 @@ function GetExceptionMask: TFPUExceptionMask;
 
 
 function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
+{$if not(defined(gba)) and not(defined(nds)) and not(defined(FPUSOFT)) and not(defined(FPULIBGCC))}
   var
     cw : dword;
+{$endif}
   begin
 {$if not(defined(gba)) and not(defined(nds)) and not(defined(FPUSOFT)) and not(defined(FPULIBGCC))}
     cw:=FPU_GetCW;

+ 0 - 1
rtl/inc/heaptrc.pp

@@ -295,7 +295,6 @@ end;
 procedure call_stack(pp : pheap_mem_info;var ptext : text);
 var
   i  : ptruint;
-  s: PtrUInt;
 begin
   writeln(ptext,'Call trace for block $',hexstr(pointer(pp)+sizeof(theap_mem_info)),' size ',pp^.size);
   if printleakedblock then

+ 1 - 3
rtl/inc/text.inc

@@ -2321,10 +2321,8 @@ end;
 {$ifdef FPC_HAS_FEATURE_WIDESTRINGS}
 function EndOfLastCompleteUTF8CodePoint(var t: textrec): SizeInt;
 var
-  i, lenfound, codepointlen: sizeint;
-  b: byte;
+  i, codepointlen: sizeint;
 begin
-  lenfound:=0;
   for i:=t.bufpos-1 downto 0 do
     begin
       { we don't care about combining diacritical marks here: we just want a

+ 0 - 2
rtl/inc/typefile.inc

@@ -150,8 +150,6 @@ End;
 
 
 Procedure fpc_typed_read_iso(TypeSize : Longint;var f : TypedFile;out Buf);[IOCheck, Public, Alias :'FPC_TYPED_READ_ISO']; compilerproc;
-var
-  Result : Longint;
 Begin
   move((pbyte(@f)+sizeof(TypedFile))^,Buf,TypeSize);
   if not(eof(f)) then

+ 2 - 0
rtl/linux/ossysc.inc

@@ -408,8 +408,10 @@ function Fpfork : pid_t;  [public, alias : 'FPC_SYSC_FORK'];
   A negative value indicates that an error has occurred, the error is returned in
   LinuxError.
 }
+{$if defined(generic_linux_syscalls)}
 var
   pid : Int64;
+{$endif}
 Begin
 {$if defined(generic_linux_syscalls)}
  Fpfork:=Do_syscall(syscall_nr_clone,clone_flags_fork,0,0,0,TSysParam(@pid));

+ 3 - 3
rtl/linux/pthread.inc

@@ -27,7 +27,7 @@
      THREAD_PRIORITY_ABOVE_NORMAL       = 70;
      THREAD_PRIORITY_HIGHEST            = 80;
      THREAD_PRIORITY_TIME_CRITICAL      = 99;
-     PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP : array [0..5]of Integer = (0, 0, 0, 1, 0, 0);
+     //PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP : array [0..5]of Integer = (0, 0, 0, 1, 0, 0);
 
 Type
    psem_t = ^sem_t;
@@ -43,14 +43,14 @@ Type
 {$endif not FPC_USE_LIBC}
 
      TThreadPriority = (tpIdle, tpLowest, tpLower, tpNormal, tpHigher, tpHighest, tpTimeCritical);
-
+{
   const
      Priorities: array [TThreadPriority] of Integer = (
        THREAD_PRIORITY_IDLE, THREAD_PRIORITY_LOWEST, THREAD_PRIORITY_BELOW_NORMAL,
        THREAD_PRIORITY_NORMAL, THREAD_PRIORITY_ABOVE_NORMAL,
        THREAD_PRIORITY_HIGHEST, THREAD_PRIORITY_TIME_CRITICAL
      );
-
+}
   const
      _POSIX_THREAD_THREADS_MAX = 64;
      PTHREAD_THREADS_MAX = 512;

+ 0 - 3
rtl/objpas/classes/lists.inc

@@ -212,9 +212,6 @@ end;
 
 function TFPList.IndexOfItem(Item: Pointer; Direction: TDirection): Integer;
 
-Var
-  C : Integer;
-
 begin
   if Direction=fromBeginning then
     Result:=IndexOf(Item)

+ 0 - 4
rtl/objpas/classes/streams.inc

@@ -159,10 +159,6 @@ end;
 
   procedure TStream.FakeSeekForward(Offset: Int64;  const Origin: TSeekOrigin; const Pos: Int64);
 
-  var
-    Buffer: Pointer;
-    BufferSize, i: LongInt;
-
   begin
     if Origin=soBeginning then
        Dec(Offset,Pos);

+ 1 - 2
rtl/objpas/classes/stringl.inc

@@ -595,7 +595,6 @@ Function TStrings.GetNextLineBreak (Const Value : String; Var S : String; Var P
 
 Var
   PS,PC,PP : PChar;
-  IP,L : Integer;
 
 begin
   S:='';
@@ -1238,7 +1237,7 @@ end;
 Procedure TStringList.SetCapacity(NewCapacity: Integer);
 
 Var NewList : Pointer;
-    I,MSize : Longint;
+    MSize : Longint;
 
 begin
   If (NewCapacity<0) then

+ 0 - 1
rtl/objpas/sysutils/dati.inc

@@ -982,7 +982,6 @@ var
 
 var
   Year, Month, Day, DayOfWeek, Hour, Minute, Second, MilliSecond: word;
-  DT : TDateTime;
 
   procedure StoreFormat(const FormatStr: string; Nesting: Integer; TimeFlag: Boolean);
   var

+ 2 - 1
rtl/objpas/sysutils/sysstr.inc

@@ -1878,7 +1878,6 @@ Var
   UnexpectedDigits: Integer;                  { Number Of unexpected Digits that }
                                               { have To be inserted before the   }
                                               { First placeholder.               }
-  UnexpectedDigitsStart: Integer;             { Location in Digits where first unexpected Digit is located }
   DigitExponent: Integer;                     { Exponent Of First digit In       }
                                               { Digits Array.                    }
 
@@ -2823,6 +2822,7 @@ cd    it is better to not use those, since most implementation are not 100%
 
 
 const
+{$if defined(MSDOS) or defined(GO32V2) or defined(WATCOM) }
    { upper case translation table for character set 850 }
    CP850UCT: array[128..255] of char =
    (#128,#154,#144,#182,#142,#182,#143,#128,#210,#211,#212,#216,#215,#222,#142,#143,
@@ -2844,6 +2844,7 @@ const
     #208,#209,#136,#137,#138,#213,#161,#140,#139,#217,#218,#219,#220,#221,#141,#223,
     #162,#225,#147,#149,#228,#228,#230,#237,#232,#163,#150,#151,#236,#236,#238,#239,
     #240,#241,#242,#243,#244,#245,#246,#247,#248,#249,#250,#251,#252,#253,#254,#255);
+{$endif}
 
    { upper case translation table for character set ISO 8859/1  Latin 1  }
    CPISO88591UCT: array[192..255] of char =

+ 0 - 1
rtl/unix/syscgen.inc

@@ -6,7 +6,6 @@ Function fpgetenv(name:pchar):pchar;[public, alias : 'FPC_SYSC_FPGETENVPCHAR'];
 
 var
   p     : ppchar;
-  found : boolean;
   np,cp : pchar;
   len,i : longint;
 Begin

+ 0 - 1
rtl/unix/sysutils.pp

@@ -236,7 +236,6 @@ procedure UnhookSignal(RtlSigNum: Integer; OnlyIfHooked: Boolean = True);
   var
     act: SigActionRec;
     lowsig, highsig, i: Integer;
-    state: TSignalState;
   begin
     if not signalinfoinited then
       initsignalinfo;