* Fixed 'mixed signed/unsigned' and pointer conversion warnings.

git-svn-id: trunk@11439 -
This commit is contained in:
yury 2008-07-23 09:36:07 +00:00
parent 5548824859
commit cf7390ea81
6 changed files with 11 additions and 11 deletions

View File

@ -428,8 +428,8 @@ implementation
((torddef(left.resultdef).low < int64(tsetdef(right.resultdef).setbase)) or
(torddef(left.resultdef).high > int64(tsetdef(right.resultdef).setmax)))) or
((left.resultdef.typ=enumdef) and
((tenumdef(left.resultdef).min < tsetdef(right.resultdef).setbase) or
(tenumdef(left.resultdef).max > tsetdef(right.resultdef).setmax))) then
((tenumdef(left.resultdef).min < aint(tsetdef(right.resultdef).setbase)) or
(tenumdef(left.resultdef).max > aint(tsetdef(right.resultdef).setmax)))) then
begin
current_asmdata.getjumplabel(l);
current_asmdata.getjumplabel(l2);

View File

@ -662,7 +662,7 @@ unit rgobj;
if movelist=nil then
begin
{ don't use sizeof(tmovelistheader), because that ignores alignment }
getmem(movelist,ptrint(@movelist^.data)-ptrint(movelist)+60*sizeof(pointer));
getmem(movelist,ptruint(@movelist^.data)-ptruint(movelist)+60*sizeof(pointer));
movelist^.header.maxcount:=60;
movelist^.header.count:=0;
movelist^.header.sorted_until:=0;
@ -673,7 +673,7 @@ unit rgobj;
begin
movelist^.header.maxcount:=movelist^.header.maxcount*2;
{ don't use sizeof(tmovelistheader), because that ignores alignment }
reallocmem(movelist,ptrint(@movelist^.data)-ptrint(movelist)+movelist^.header.maxcount*sizeof(pointer));
reallocmem(movelist,ptruint(@movelist^.data)-ptruint(movelist)+movelist^.header.maxcount*sizeof(pointer));
end;
end;
movelist^.data[movelist^.header.count]:=data;

View File

@ -2316,7 +2316,7 @@ implementation
{ prevent overflow, return -1 to indicate overflow }
{ also make sure we don't need 64/128 bit arithmetic to calculate offsets }
if (cachedelecount > high(aint)) or
((high(aint) div cachedelesize) < cachedelecount) or
((high(aint) div cachedelesize) < aint(cachedelecount)) or
{ also lowrange*elesize must be < high(aint) to prevent overflow when
accessing the array, see ncgmem (PFV) }
((high(aint) div cachedelesize) < abs(lowrange)) then
@ -2326,9 +2326,9 @@ implementation
end;
if (ado_IsBitPacked in arrayoptions) then
size:=(cachedelesize * cachedelecount + 7) div 8
size:=(cachedelesize * aint(cachedelecount) + 7) div 8
else
result:=cachedelesize*cachedelecount;
result:=cachedelesize*aint(cachedelecount);
end;

View File

@ -495,8 +495,8 @@ implementation
((torddef(left.resultdef).low < int64(tsetdef(right.resultdef).setbase)) or
(torddef(left.resultdef).high > int64(tsetdef(right.resultdef).setmax)))) or
((left.resultdef.typ=enumdef) and
((tenumdef(left.resultdef).min < tsetdef(right.resultdef).setbase) or
(tenumdef(left.resultdef).max > tsetdef(right.resultdef).setmax))) then
((tenumdef(left.resultdef).min < aint(tsetdef(right.resultdef).setbase)) or
(tenumdef(left.resultdef).max > aint(tsetdef(right.resultdef).setmax)))) then
begin
{ we have to check if the value is < 0 or > setmax }

View File

@ -780,7 +780,7 @@ Implementation
{ Search opcodes }
if len>0 then
begin
actopcode:=tasmop(PtrInt(iasmops.Find(copy(s,1,len))));
actopcode:=tasmop(PtrUInt(iasmops.Find(copy(s,1,len))));
if actopcode<>A_NONE then
begin
if gas_needsuffix[actopcode]=attsufFPU then

View File

@ -161,7 +161,7 @@ Unit Rax86int;
actopsize:=S_NO;
{ Search opcodes }
actopcode:=tasmop(PtrInt(iasmops.Find(s)));
actopcode:=tasmop(PtrUInt(iasmops.Find(s)));
if actopcode<>A_NONE then
begin
actasmtoken:=AS_OPCODE;