From 608572c63a3404011bad0af855823d9146dc5f75 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Sat, 20 Aug 2011 07:54:37 +0000 Subject: [PATCH] * removed unused local variables * fixed some "uninitialised function result" warnings for dummy routines git-svn-id: branches/jvmbackend@18381 - --- compiler/agjasmin.pas | 16 ++-------------- compiler/hlcgobj.pas | 1 - compiler/jvm/aasmcpu.pas | 2 ++ compiler/jvm/cgcpu.pas | 2 -- compiler/jvm/hlcgcpu.pas | 4 ---- compiler/jvm/njvmcnv.pas | 3 --- 6 files changed, 4 insertions(+), 24 deletions(-) diff --git a/compiler/agjasmin.pas b/compiler/agjasmin.pas index 5209d4a16b..9ed88312c9 100644 --- a/compiler/agjasmin.pas +++ b/compiler/agjasmin.pas @@ -146,22 +146,14 @@ implementation ch : char; hp : tai; hp1 : tailineinfo; - constdef : taiconst_type; - s,t : string; - i,pos,l : longint; + s : string; + i,pos : longint; InlineLevel : longint; - last_align : longint; - co : comp; - sin : single; - d : double; do_line : boolean; - - sepChar : char; begin if not assigned(p) then exit; - last_align := 2; InlineLevel:=0; { lineinfo is only needed for al_procedures (PFV) } do_line:=(cs_asm_source in current_settings.globalswitches); @@ -733,9 +725,6 @@ implementation procedure TJasminAssembler.WriteAsmList; - var - hal : tasmlisttype; - i: longint; begin {$ifdef EXTDEBUG} if assigned(current_module.mainsource) then @@ -808,7 +797,6 @@ implementation function getopstr(const o:toper) : ansistring; var i,runstart,runlen: longint; - num: string[4]; d: double; s: single; begin diff --git a/compiler/hlcgobj.pas b/compiler/hlcgobj.pas index 08e2e65023..7b9967b9d0 100644 --- a/compiler/hlcgobj.pas +++ b/compiler/hlcgobj.pas @@ -1661,7 +1661,6 @@ implementation procedure thlcgobj.location_force_fpureg(list: TAsmList; var l: tlocation; size: tdef; maybeconst: boolean); var reg : tregister; - href : treference; begin if (l.loc<>LOC_FPUREGISTER) and ((l.loc<>LOC_CFPUREGISTER) or (not maybeconst)) then diff --git a/compiler/jvm/aasmcpu.pas b/compiler/jvm/aasmcpu.pas index 1f43406535..57e9d66b7f 100644 --- a/compiler/jvm/aasmcpu.pas +++ b/compiler/jvm/aasmcpu.pas @@ -274,12 +274,14 @@ implementation function spilling_create_load(const ref:treference;r:tregister):Taicpu; begin internalerror(2010122614); + result:=nil; end; function spilling_create_store(r:tregister; const ref:treference):Taicpu; begin internalerror(2010122615); + result:=nil; end; diff --git a/compiler/jvm/cgcpu.pas b/compiler/jvm/cgcpu.pas index 2e96c65133..71f2943f99 100644 --- a/compiler/jvm/cgcpu.pas +++ b/compiler/jvm/cgcpu.pas @@ -113,8 +113,6 @@ implementation procedure tcgjvm.do_register_allocation(list:TAsmList;headertai:tai); - var - rt : tregistertype; begin { We only run the "register allocation" once for an arbitrary allocator, which will perform the register->temp mapping for all register types. diff --git a/compiler/jvm/hlcgcpu.pas b/compiler/jvm/hlcgcpu.pas index fbd7cc86f0..2b979bc8a6 100644 --- a/compiler/jvm/hlcgcpu.pas +++ b/compiler/jvm/hlcgcpu.pas @@ -1054,8 +1054,6 @@ implementation end; procedure thlcgjvm.g_initialize(list: TAsmList; t: tdef; const ref: treference); - var - extra_slots: longint; begin a_load_const_ref(list,t,0,ref); end; @@ -1127,8 +1125,6 @@ implementation getputopc: array[boolean,boolean] of tasmop = ((a_putfield,a_putstatic), (a_getfield,a_getstatic)); - var - size: aint; begin if assigned(ref.symbol) then begin diff --git a/compiler/jvm/njvmcnv.pas b/compiler/jvm/njvmcnv.pas index 92849c5de6..fc74c87a08 100644 --- a/compiler/jvm/njvmcnv.pas +++ b/compiler/jvm/njvmcnv.pas @@ -195,7 +195,6 @@ implementation end; var - href : treference; signeddef : tdef; l1 : tasmlabel; @@ -276,8 +275,6 @@ implementation procedure tjvmtypeconvnode.second_int_to_bool; var - href: treference; - hreg2 : tregister; hlabel1,hlabel2,oldTrueLabel,oldFalseLabel : tasmlabel; newsize : tcgsize; begin