mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 09:39:09 +02:00
* fixed more warnings and notes while compiling RTL.
git-svn-id: trunk@4259 -
This commit is contained in:
parent
fefe85a86a
commit
5a49addb35
@ -214,6 +214,7 @@ end;
|
|||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
{$IFNDEF HAS_FSPLIT}
|
{$IFNDEF HAS_FSPLIT}
|
||||||
|
{$warnings off}
|
||||||
Procedure FSplit (Path: PathStr; var Dir: DirStr; var Name: NameStr; var Ext: ExtStr);
|
Procedure FSplit (Path: PathStr; var Dir: DirStr; var Name: NameStr; var Ext: ExtStr);
|
||||||
var
|
var
|
||||||
DirEnd, ExtStart: Longint;
|
DirEnd, ExtStart: Longint;
|
||||||
@ -266,6 +267,7 @@ begin
|
|||||||
Name := Copy (Path, DirEnd + 1, ExtStart - DirEnd - 1);
|
Name := Copy (Path, DirEnd + 1, ExtStart - DirEnd - 1);
|
||||||
Ext := Copy (Path, ExtStart, Length (Path) - ExtStart + 1);
|
Ext := Copy (Path, ExtStart, Length (Path) - ExtStart + 1);
|
||||||
end;
|
end;
|
||||||
|
{$warnings on}
|
||||||
{$ENDIF HAS_FSPLIT}
|
{$ENDIF HAS_FSPLIT}
|
||||||
|
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ begin
|
|||||||
|
|
||||||
(* Allow both '/' and '\' as directory separators *)
|
(* Allow both '/' and '\' as directory separators *)
|
||||||
(* by converting all to the native one. *)
|
(* by converting all to the native one. *)
|
||||||
|
{$warnings off}
|
||||||
if DirectorySeparator = '\' then
|
if DirectorySeparator = '\' then
|
||||||
{Allow slash as backslash}
|
{Allow slash as backslash}
|
||||||
begin
|
begin
|
||||||
@ -141,6 +142,7 @@ begin
|
|||||||
if Pa [I] = '\' then
|
if Pa [I] = '\' then
|
||||||
Pa [I] := '/';
|
Pa [I] := '/';
|
||||||
end;
|
end;
|
||||||
|
{$warnings on}
|
||||||
|
|
||||||
(* PathStart is amount of characters to strip to get beginning *)
|
(* PathStart is amount of characters to strip to get beginning *)
|
||||||
(* of path without volume/drive specification. *)
|
(* of path without volume/drive specification. *)
|
||||||
|
@ -199,8 +199,10 @@ Procedure fpc_WideStr_Decr_Ref (Var S : Pointer);[Public,Alias:'FPC_WIDESTR_DECR
|
|||||||
}
|
}
|
||||||
Type
|
Type
|
||||||
pSizeInt = ^SizeInt;
|
pSizeInt = ^SizeInt;
|
||||||
|
{$ifndef FPC_WINLIKEWIDESTRING}
|
||||||
Var
|
Var
|
||||||
l : pSizeInt;
|
l : pSizeInt;
|
||||||
|
{$endif FPC_WINLIKEWIDESTRING}
|
||||||
Begin
|
Begin
|
||||||
{ Zero string }
|
{ Zero string }
|
||||||
if S=Nil then
|
if S=Nil then
|
||||||
@ -765,6 +767,7 @@ procedure WideCharToStrVar(S : PWideChar;out Dest : AnsiString);
|
|||||||
Function fpc_widestr_Unique(Var S : Pointer): Pointer; [Public,Alias : 'FPC_WIDESTR_UNIQUE']; compilerproc;
|
Function fpc_widestr_Unique(Var S : Pointer): Pointer; [Public,Alias : 'FPC_WIDESTR_UNIQUE']; compilerproc;
|
||||||
{$ifdef FPC_WINLIKEWIDESTRING}
|
{$ifdef FPC_WINLIKEWIDESTRING}
|
||||||
begin
|
begin
|
||||||
|
pointer(result) := pointer(s);
|
||||||
end;
|
end;
|
||||||
{$else FPC_WINLIKEWIDESTRING}
|
{$else FPC_WINLIKEWIDESTRING}
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,7 @@ var
|
|||||||
s : ansistring;
|
s : ansistring;
|
||||||
size : dword;
|
size : dword;
|
||||||
rc : dword;
|
rc : dword;
|
||||||
p,buf : pchar;
|
buf : pchar;
|
||||||
begin
|
begin
|
||||||
s := ExpandFileName (filename);
|
s := ExpandFileName (filename);
|
||||||
|
|
||||||
@ -852,8 +852,6 @@ Procedure LoadVersionInfo;
|
|||||||
// and getfreespaceex
|
// and getfreespaceex
|
||||||
Var
|
Var
|
||||||
versioninfo : TOSVERSIONINFO;
|
versioninfo : TOSVERSIONINFO;
|
||||||
i : Integer;
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
kernel32dll:=0;
|
kernel32dll:=0;
|
||||||
GetDiskFreeSpaceEx:=nil;
|
GetDiskFreeSpaceEx:=nil;
|
||||||
|
@ -297,8 +297,8 @@
|
|||||||
|
|
||||||
_RASCONNSTATE = RASCONNSTATE;
|
_RASCONNSTATE = RASCONNSTATE;
|
||||||
|
|
||||||
RASPROJECTION = (RASP_Amb := $10000,RASP_PppNbf := $803F,RASP_PppIpx := $802B,
|
RASPROJECTION = (RASP_PppIp := $8021, RASP_PppIpx := $802B, RASP_PppNbf := $803F,
|
||||||
RASP_PppIp := $8021);
|
RASP_Amb := $10000);
|
||||||
|
|
||||||
_RASPROJECTION = RASPROJECTION;
|
_RASPROJECTION = RASPROJECTION;
|
||||||
|
|
||||||
|
@ -1290,7 +1290,7 @@ end;
|
|||||||
|
|
||||||
procedure FD_CLR(Socket: TSocket; var FDSet: TFDSet);
|
procedure FD_CLR(Socket: TSocket; var FDSet: TFDSet);
|
||||||
var
|
var
|
||||||
I: Longint;
|
I: cardinal;
|
||||||
begin
|
begin
|
||||||
I := 0;
|
I := 0;
|
||||||
while I < FDSet.fd_count do
|
while I < FDSet.fd_count do
|
||||||
|
@ -24,6 +24,8 @@ interface
|
|||||||
{$define Set_i386_Exception_handler}
|
{$define Set_i386_Exception_handler}
|
||||||
{$endif cpui386}
|
{$endif cpui386}
|
||||||
|
|
||||||
|
{$define DISABLE_NO_THREAD_MANAGER}
|
||||||
|
|
||||||
{ include system-independent routine headers }
|
{ include system-independent routine headers }
|
||||||
{$I systemh.inc}
|
{$I systemh.inc}
|
||||||
|
|
||||||
@ -741,7 +743,7 @@ type
|
|||||||
type
|
type
|
||||||
PExceptionRecord = ^TExceptionRecord;
|
PExceptionRecord = ^TExceptionRecord;
|
||||||
TExceptionRecord = packed record
|
TExceptionRecord = packed record
|
||||||
ExceptionCode : Longint;
|
ExceptionCode : cardinal;
|
||||||
ExceptionFlags : Longint;
|
ExceptionFlags : Longint;
|
||||||
ExceptionRecord : PExceptionRecord;
|
ExceptionRecord : PExceptionRecord;
|
||||||
ExceptionAddress : Pointer;
|
ExceptionAddress : Pointer;
|
||||||
@ -851,7 +853,7 @@ begin
|
|||||||
if IsConsole then Writeln(stderr,'Exception ',
|
if IsConsole then Writeln(stderr,'Exception ',
|
||||||
hexstr(excep^.ExceptionRecord^.ExceptionCode, 8));
|
hexstr(excep^.ExceptionRecord^.ExceptionCode, 8));
|
||||||
{$endif SYSTEMEXCEPTIONDEBUG}
|
{$endif SYSTEMEXCEPTIONDEBUG}
|
||||||
case cardinal(excep^.ExceptionRecord^.ExceptionCode) of
|
case excep^.ExceptionRecord^.ExceptionCode of
|
||||||
STATUS_INTEGER_DIVIDE_BY_ZERO,
|
STATUS_INTEGER_DIVIDE_BY_ZERO,
|
||||||
STATUS_FLOAT_DIVIDE_BY_ZERO :
|
STATUS_FLOAT_DIVIDE_BY_ZERO :
|
||||||
err := 200;
|
err := 200;
|
||||||
|
@ -199,8 +199,7 @@ end;
|
|||||||
|
|
||||||
Function FileSeek (Handle : THandle; FOffset,Origin : Int64) : Int64;
|
Function FileSeek (Handle : THandle; FOffset,Origin : Int64) : Int64;
|
||||||
begin
|
begin
|
||||||
{$warning need to add 64bit call }
|
Result := SetFilePointer(Handle, longint(FOffset), nil, longint(Origin));
|
||||||
Result := longint(SetFilePointer(Handle, longint(FOffset), nil, longint(Origin)));
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user