* Fixed notes "var is assigned but not used".

git-svn-id: trunk@31734 -
This commit is contained in:
yury 2015-09-17 13:03:04 +00:00
parent e01d57cea3
commit b26fa07f1a
9 changed files with 13 additions and 25 deletions

View File

@ -1305,7 +1305,6 @@ implementation
string_symofs: asizeint;
startlab: tasmlabel;
datadef: tdef;
uniwidestrrecdef: trecorddef;
datatcb: ttai_typedconstbuilder;
begin
start_internal_data_builder(datalist,sec_rodata_norel,'',datatcb,startlab);
@ -1346,7 +1345,7 @@ implementation
{ ending #0 }
datatcb.emit_tai(Tai_const.Create_16bit(0),cwidechartype);
datatcb.maybe_end_aggregate(datadef);
uniwidestrrecdef:=datatcb.end_anonymous_record;
datatcb.end_anonymous_record;
end
else
{ code generation for other sizes must be written }

View File

@ -346,9 +346,7 @@ Unit aopt;
procedure TAsmScheduler.Optimize;
Var
HP: tai;
pass: longint;
Begin
pass:=0;
BlockStart := tai(AsmL.First);
While Assigned(BlockStart) Do
Begin

View File

@ -1156,7 +1156,7 @@ Implementation
procedure TInternalLinker.ParseScript_Handle;
var
s, para, keyword : String;
s{, para}, keyword : String;
hp : TCmdStrListItem;
i : longint;
begin
@ -1172,7 +1172,7 @@ Implementation
continue;
end;
keyword:=Upper(GetToken(s,' '));
para:=GetToken(s,' ');
{para:=}GetToken(s,' ');
if Trim(s)<>'' then
Comment(V_Warning,'Unknown part "'+s+'" in "'+hp.str+'" internal linker script');
if (keyword<>'SYMBOL') and

View File

@ -861,8 +861,6 @@ implementation
oldaktcallnode : tcallnode;
retlocitem: pcgparalocation;
pd : tprocdef;
proc_addr_size: TCgSize;
proc_addr_voidptrdef: tdef;
callref: boolean;
{$ifdef vtentry}
sym : tasmsymbol;
@ -886,9 +884,6 @@ implementation
regs_to_save_fpu:=paramanager.get_volatile_registers_fpu(procdefinition.proccalloption);
regs_to_save_mm:=paramanager.get_volatile_registers_mm(procdefinition.proccalloption);
proc_addr_voidptrdef:=procdefinition.address_type;
proc_addr_size:=def_cgsize(proc_addr_voidptrdef);
{ Include Function result registers }
if (not is_void(resultdef)) then
begin

View File

@ -249,7 +249,6 @@ implementation
uopsize : tcgsize;
uopdef : tdef;
orgopsize : tcgsize;
orgopdef : tdef;
genjumps,
use_small : boolean;
i,numparts : byte;
@ -263,7 +262,6 @@ implementation
genjumps := checkgenjumps(setparts,numparts,use_small);
orgopsize := def_cgsize(left.resultdef);
orgopdef := left.resultdef;
uopsize := OS_32;
uopdef := u32inttype;
if is_signed(left.resultdef) then

View File

@ -873,9 +873,7 @@ implementation
srsym: tsym;
srsymtable: tsymtable;
i: longint;
name: TIDString;
begin
name:=internaltypeprefixName[prefix];
if searchsym_type(copy(internaltypeprefixName[prefix],2,length(internaltypeprefixName[prefix])),srsym,srsymtable) then
begin
result:=trecorddef(ttypesym(srsym).typedef);
@ -1034,7 +1032,9 @@ implementation
methodnametable,intmessagetable,
strmessagetable,classnamelabel,
fieldtablelabel : tasmlabel;
{$ifdef vtentry}
hs: string;
{$endif vtentry}
{$ifdef WITHDMT}
dmtlabel : tasmlabel;
{$endif WITHDMT}
@ -1082,7 +1082,6 @@ implementation
begin
{ write class name }
tcb.start_internal_data_builder(current_asmdata.asmlists[al_const],sec_rodata_norel,'',datatcb,classnamelabel);
hs:=_class.RttiName;
classnamedef:=datatcb.emit_shortstring_const(_class.RttiName);
tcb.finish_internal_data_builder(datatcb,classnamelabel,classnamedef,sizeof(pint));

View File

@ -2182,8 +2182,7 @@ const pemagic : array[0..3] of byte = (
textExeSec,
dataExeSec,
bssExeSec,
idataExeSec,
tlsExeSec : TExeSection;
idataExeSec : TExeSection;
hassymbols,
writeDbgStrings : boolean;
@ -2248,7 +2247,7 @@ const pemagic : array[0..3] of byte = (
tlsexesymbol: TExeSymbol;
tlssymbol: TObjSymbol;
callbackexesymbol: TExeSymbol;
callbacksymbol: TObjSymbol;
//callbacksymbol: TObjSymbol;
begin
{ according to GNU ld,
the callback routines should be placed into .CRT$XL*
@ -2274,7 +2273,7 @@ const pemagic : array[0..3] of byte = (
'__FPC_tls_callbacks'));
if assigned (callbackexesymbol) then
begin
callbacksymbol:=callbackexesymbol.ObjSymbol;
//callbacksymbol:=callbackexesymbol.ObjSymbol;
end;
end;
@ -2288,7 +2287,6 @@ const pemagic : array[0..3] of byte = (
textExeSec:=FindExeSection('.text');
dataExeSec:=FindExeSection('.data');
bssExeSec:=FindExeSection('.bss');
tlsExeSec:=FindExeSection('.tls');
if not assigned(TextExeSec) or
not assigned(DataExeSec) then
internalerror(200602231);

View File

@ -326,8 +326,11 @@ unit optdfa;
counteruse_after_loop:=assigned(tfornode(node).left.optinfo) and assigned(node.successor) and
DFASetIn(node.successor.optinfo^.life,tfornode(node).left.optinfo^.index);
{ if yes, then we should warn }
{ !!!!!! }
if counteruse_after_loop then
begin
{ if yes, then we should warn }
{ !!!!!! }
end;
{ first update the dummy node }

View File

@ -359,14 +359,12 @@ implementation
var
RawRecord: TOmfRawRecord;
Header: TOmfRecord_LIBHEAD;
FIsCaseSensitive: Boolean;
begin
RawRecord:=TOmfRawRecord.Create;
RawRecord.ReadFrom(Self);
Header:=TOmfRecord_LIBHEAD.Create;
Header.DecodeFrom(RawRecord);
FPageSize:=Header.PageSize;
FIsCaseSensitive:=Header.CaseSensitive;
ReadDictionary(Header.DictionaryOffset, Header.DictionarySizeInBlocks);
end;