فهرست منبع

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

git-svn-id: trunk@11439 -
yury 17 سال پیش
والد
کامیت
cf7390ea81
6فایلهای تغییر یافته به همراه11 افزوده شده و 11 حذف شده
  1. 2 2
      compiler/ncgset.pas
  2. 2 2
      compiler/rgobj.pas
  3. 3 3
      compiler/symdef.pas
  4. 2 2
      compiler/x86/nx86set.pas
  5. 1 1
      compiler/x86/rax86att.pas
  6. 1 1
      compiler/x86/rax86int.pas

+ 2 - 2
compiler/ncgset.pas

@@ -428,8 +428,8 @@ implementation
                       ((torddef(left.resultdef).low < int64(tsetdef(right.resultdef).setbase)) or
                       ((torddef(left.resultdef).low < int64(tsetdef(right.resultdef).setbase)) or
                        (torddef(left.resultdef).high > int64(tsetdef(right.resultdef).setmax)))) or
                        (torddef(left.resultdef).high > int64(tsetdef(right.resultdef).setmax)))) or
                      ((left.resultdef.typ=enumdef) and
                      ((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
                     begin
                       current_asmdata.getjumplabel(l);
                       current_asmdata.getjumplabel(l);
                       current_asmdata.getjumplabel(l2);
                       current_asmdata.getjumplabel(l2);

+ 2 - 2
compiler/rgobj.pas

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

+ 3 - 3
compiler/symdef.pas

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

+ 2 - 2
compiler/x86/nx86set.pas

@@ -495,8 +495,8 @@ implementation
                       ((torddef(left.resultdef).low < int64(tsetdef(right.resultdef).setbase)) or
                       ((torddef(left.resultdef).low < int64(tsetdef(right.resultdef).setbase)) or
                        (torddef(left.resultdef).high > int64(tsetdef(right.resultdef).setmax)))) or
                        (torddef(left.resultdef).high > int64(tsetdef(right.resultdef).setmax)))) or
                      ((left.resultdef.typ=enumdef) and
                      ((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
                    begin
 
 
                     { we have to check if the value is < 0 or > setmax }
                     { we have to check if the value is < 0 or > setmax }

+ 1 - 1
compiler/x86/rax86att.pas

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

+ 1 - 1
compiler/x86/rax86int.pas

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