浏览代码

* removed warnings about possible range check errors

Jonas Maebe 25 年之前
父节点
当前提交
e665968fc8
共有 1 个文件被更改,包括 11 次插入8 次删除
  1. 11 8
      rtl/objpas/sysstr.inc

+ 11 - 8
rtl/objpas/sysstr.inc

@@ -118,7 +118,7 @@ end ;
     P1 = P2    = 0    }
     P1 = P2    = 0    }
 
 
 function CompareMemRange(P1, P2: Pointer; Length: cardinal): integer;
 function CompareMemRange(P1, P2: Pointer; Length: cardinal): integer;
-var i: integer;
+var i: cardinal;
 begin
 begin
 i := 0;
 i := 0;
 result := 0;
 result := 0;
@@ -132,7 +132,7 @@ end ;
 
 
 function CompareMem(P1, P2: Pointer; Length: cardinal): Boolean;
 function CompareMem(P1, P2: Pointer; Length: cardinal): Boolean;
 var
 var
-  i: Integer;
+  i: cardinal;
 begin
 begin
   for i := 0 to Length - 1 do
   for i := 0 to Length - 1 do
   begin
   begin
@@ -280,7 +280,7 @@ end;
 
 
 function AnsiStrLComp(S1, S2: PChar; MaxLen: cardinal): integer;
 function AnsiStrLComp(S1, S2: PChar; MaxLen: cardinal): integer;
 
 
-Var I : longint;
+Var I : cardinal;
 
 
 begin
 begin
   Result:=0;
   Result:=0;
@@ -306,7 +306,7 @@ end ;
 
 
 function AnsiStrLIComp(S1, S2: PChar; MaxLen: cardinal): integer;
 function AnsiStrLIComp(S1, S2: PChar; MaxLen: cardinal): integer;
 
 
-Var I : longint;
+Var I : cardinal;
 
 
 begin
 begin
   Result:=0;
   Result:=0;
@@ -846,7 +846,7 @@ begin
                 ToAdd:=StringOfChar('0',Index)+ToAdd
                 ToAdd:=StringOfChar('0',Index)+ToAdd
               else
               else
                 // + 1 to accomodate for - sign in length !!
                 // + 1 to accomodate for - sign in length !!
-                Insert(StringOfChar('0',Index+1),toadd,2);  
+                Insert(StringOfChar('0',Index+1),toadd,2);
               end;
               end;
         'E' : begin
         'E' : begin
               CheckArg(vtExtended,true);
               CheckArg(vtExtended,true);
@@ -931,7 +931,7 @@ begin
   Setlength(F,fmtlen);
   Setlength(F,fmtlen);
   Move(fmt,F[1],fmtlen);
   Move(fmt,F[1],fmtlen);
   S:=Format (F,Args);
   S:=Format (F,Args);
-  If Length(S)>Buflen then
+  If cardinal(Length(S))>Buflen then
     Result:=Length(S)
     Result:=Length(S)
   else
   else
     Result:=Buflen;
     Result:=Buflen;
@@ -1165,7 +1165,7 @@ Function LastDelimiter(const Delimiters, S: string): Integer;
 
 
 begin
 begin
   Result:=Length(S);
   Result:=Length(S);
-  While (Result>0) and (Pos(S[Result],Delimiters)=0) do 
+  While (Result>0) and (Pos(S[Result],Delimiters)=0) do
     Dec(Result);
     Dec(Result);
 end;
 end;
 
 
@@ -1227,7 +1227,10 @@ const
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.1.2.4  2000-12-07 21:48:57  michael
+  Revision 1.1.2.5  2000-12-16 15:58:18  jonas
+    * removed warnings about possible range check errors
+
+  Revision 1.1.2.4  2000/12/07 21:48:57  michael
   + Added LastDelimiter function
   + Added LastDelimiter function
 
 
   Revision 1.1.2.3  2000/12/06 22:51:58  michael
   Revision 1.1.2.3  2000/12/06 22:51:58  michael