Avoid warnings when -v0 is used by using $push/$pop

git-svn-id: trunk@41960 -
This commit is contained in:
pierre 2019-04-29 14:19:16 +00:00
parent b365fdd478
commit 819752c334
4 changed files with 8 additions and 4 deletions

View File

@ -232,6 +232,7 @@ end;
****************************************************************************} ****************************************************************************}
{$IFNDEF HAS_FSPLIT} {$IFNDEF HAS_FSPLIT}
{$push}
{$warnings off} {$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
@ -275,7 +276,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} {$pop}
{$ENDIF HAS_FSPLIT} {$ENDIF HAS_FSPLIT}

View File

@ -160,11 +160,12 @@ begin
{$IFNDEF FPC_FEXPAND_SYSUTILS} {$IFNDEF FPC_FEXPAND_SYSUTILS}
(* 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. *)
{$push}
{$warnings off} {$warnings off}
for I := 1 to Length (Pa) do for I := 1 to Length (Pa) do
if CharInSet(Pa [I], AllowDirectorySeparators) then if CharInSet(Pa [I], AllowDirectorySeparators) then
Pa [I] := DirectorySeparator; Pa [I] := DirectorySeparator;
{$warnings on} {$pop}
{$ENDIF not FPC_FEXPAND_SYSUTILS} {$ENDIF not FPC_FEXPAND_SYSUTILS}
(* PathStart is amount of characters to strip to get beginning *) (* PathStart is amount of characters to strip to get beginning *)

View File

@ -2313,6 +2313,7 @@ function StringCodePage(const S: UnicodeString): TSystemCodePage; overload;
end; end;
{$push}
{$warnings off} {$warnings off}
function StubUnicodeCase(const s : UnicodeString) : UnicodeString; function StubUnicodeCase(const s : UnicodeString) : UnicodeString;
begin begin
@ -2333,7 +2334,7 @@ function StubCompareWideString(const s1, s2 : WideString; Options : TCompareOpti
begin begin
unimplementedunicodestring; unimplementedunicodestring;
end; end;
{$warnings on} {$pop}
procedure initunicodestringmanager; procedure initunicodestringmanager;
begin begin

View File

@ -1047,6 +1047,7 @@ begin
inherited Destroy; inherited Destroy;
end; end;
{$push}
{$warnings off} {$warnings off}
function TStreamAdapter.Read(pv: Pointer; cb: DWORD; pcbRead: PDWORD): HResult; stdcall; function TStreamAdapter.Read(pv: Pointer; cb: DWORD; pcbRead: PDWORD): HResult; stdcall;
var var
@ -1267,4 +1268,4 @@ begin
raise e; raise e;
end; end;
{$warnings on} {$pop}