Kaynağa Gözat

compiler: reduce amount of hints and warnings

git-svn-id: trunk@17350 -
paul 14 yıl önce
ebeveyn
işleme
d21bbc4548

+ 0 - 2
compiler/cclasses.pas

@@ -1416,8 +1416,6 @@ begin
 end;
 
 function TFPHashList.InternalFind(AHash:LongWord;const AName:shortstring;out PrevIndex:Integer):Integer;
-var
-  HashIndex : Integer;
 begin
   prefetch(AName);
   Result:=FHashTable^[AHash and FCapacityMask];

+ 0 - 2
compiler/finput.pas

@@ -446,8 +446,6 @@ uses
  ****************************************************************************}
 
     function tdosinputfile.fileopen(const filename: string): boolean;
-      var
-        ofm : byte;
       begin
         { Check if file exists, this will also check if it is
           a real file and not a directory }

+ 2 - 0
compiler/nadd.pas

@@ -2476,7 +2476,9 @@ implementation
          rd,ld   : tdef;
          i       : longint;
          lt,rt   : tnodetype;
+{$ifdef cpuneedsmulhelper}
          procname : string[32];
+{$endif cpuneedsmulhelper}
       begin
          result:=nil;
 

+ 3 - 1
compiler/ncgutil.pas

@@ -2538,7 +2538,7 @@ implementation
         if sym.section<>'' then
           new_section(list,sec_user,sym.section,varalign)
         else
-         new_section(list,sectype,lower(sym.mangledname),varalign);
+          new_section(list,sectype,lower(sym.mangledname),varalign);
         if (sym.owner.symtabletype=globalsymtable) or
            create_smartlink or
            DLLSource or
@@ -3148,8 +3148,10 @@ implementation
     procedure InsertInterruptTable;
 
       procedure WriteVector(const name: string);
+{$IFDEF arm}
         var
           ai: taicpu;
+{$ENDIF arm}
         begin
 {$IFDEF arm}
           if current_settings.cputype in [cpu_armv7m, cpu_cortexm3] then

+ 2 - 0
compiler/nmat.pas

@@ -483,7 +483,9 @@ implementation
     function tshlshrnode.pass_typecheck:tnode;
       var
          t : tnode;
+{$ifdef cpunodefaultint}
          nd : tdef;
+{$endif cpunodefaultint}
       begin
          result:=nil;
          typecheckpass(left);

+ 0 - 1
compiler/nset.pas

@@ -187,7 +187,6 @@ implementation
 
       var
         t : tnode;
-        pst : pconstset;
 
         function createsetconst(psd : tsetdef) : pconstset;
         var

+ 2 - 3
compiler/ppu.pas

@@ -413,7 +413,6 @@ end;
 
 function tppufile.openfile:boolean;
 var
-  ofmode : byte;
   i      : integer;
 begin
   openfile:=false;
@@ -1189,8 +1188,8 @@ procedure tppufile.tempclose;
 
 
 function tppufile.tempopen:boolean;
-  var
-    ofm : byte;
+  //var
+  //  ofm : byte;
   begin
     tempopen:=false;
     if not closed or not tempclosed then

+ 0 - 1
compiler/ptype.pas

@@ -1006,7 +1006,6 @@ implementation
            lv,hv   : TConstExprInt;
            old_block_type : tblock_type;
            dospecialize : boolean;
-           structdef: tdef;
         begin
            old_block_type:=block_type;
            dospecialize:=false;

+ 0 - 2
compiler/symdef.pas

@@ -2804,8 +2804,6 @@ implementation
       end;
 
     function tabstractrecorddef.RttiName: string;
-      var
-        tmp: tabstractrecorddef;
       begin
         Result:=OwnerHierarchyName+objrealname^;
       end;

+ 0 - 2
compiler/systems/t_nwm.pas

@@ -668,7 +668,6 @@ end;
         procedure addLinkerOptions;
         var
           s,option : string;
-          p : integer;
         begin
           s := ParaLinkOptions;
           option := GetToken(s,';');
@@ -720,7 +719,6 @@ end;
         function findPrelude : string;
         var
           s,option,keyword : string;
-          p : integer;
         begin
           s := ParaLinkOptions;
           option := GetToken(s,';');