* Fixed warnings.

git-svn-id: trunk@40188 -
This commit is contained in:
yury 2018-11-02 19:22:46 +00:00
parent 78a26e53f8
commit a19528efa1
2 changed files with 7 additions and 3 deletions

View File

@ -29,7 +29,7 @@ function align(addr : Pointer;alignment : PtrUInt) : Pointer;{$ifdef SYSTEMINLIN
tmp: PtrUInt;
begin
tmp:=PtrUInt(addr)+(alignment-1);
result:=pointer(tmp-(tmp mod alignment));
result:=pointer(ptruint(tmp-(tmp mod alignment)));
end;
{$endif}

View File

@ -1835,6 +1835,7 @@ end;
//One character US-ASCII, convert it to unicode
if IBYTE = 10 then
begin
(*
If (PreChar<>13) and FALSE then
begin
//Expand to crlf, conform UTF-8.
@ -1855,6 +1856,7 @@ end;
end;
end
else
*)
begin
Dest[OutputUnicode]:=WideChar(IBYTE);
inc(OutputUnicode);
@ -1978,6 +1980,7 @@ end;
//One character US-ASCII, convert it to unicode
if IBYTE = 10 then
begin
(*
if (PreChar<>13) and FALSE then
begin
//Expand to crlf, conform UTF-8.
@ -1987,6 +1990,7 @@ end;
PreChar:=10;
end
else
*)
begin
inc(OutputUnicode);
PreChar:=IBYTE;
@ -2242,7 +2246,7 @@ function UCS4StringToUnicodeString(const s : UCS4String) : UnicodeString;
begin
reslen:=0;
for i:=0 to length(s)-2 do { skip terminating #0 }
Inc(reslen,1+ord((s[i]>$ffff) and (s[i]<=$10ffff)));
Inc(reslen,1+ord((s[i]>$ffff) and (cardinal(s[i])<=$10ffff)));
SetLength(result,reslen);
UCS4Decode(s,pointer(result));
end;
@ -2255,7 +2259,7 @@ function UCS4StringToWideString(const s : UCS4String) : WideString;
begin
reslen:=0;
for i:=0 to length(s)-2 do { skip terminating #0 }
Inc(reslen,1+ord((s[i]>$ffff) and (s[i]<=$10ffff)));
Inc(reslen,1+ord((s[i]>$ffff) and (cardinal(s[i])<=$10ffff)));
SetLength(result,reslen);
UCS4Decode(s,pointer(result));
end;