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}
{$push}
{$warnings off}
Procedure FSplit (Path: PathStr; var Dir: DirStr; var Name: NameStr; var Ext: ExtStr);
var
@ -275,7 +276,7 @@ begin
Name := Copy (Path, DirEnd + 1, ExtStart - DirEnd - 1);
Ext := Copy (Path, ExtStart, Length (Path) - ExtStart + 1);
end;
{$warnings on}
{$pop}
{$ENDIF HAS_FSPLIT}

View File

@ -160,11 +160,12 @@ begin
{$IFNDEF FPC_FEXPAND_SYSUTILS}
(* Allow both '/' and '\' as directory separators *)
(* by converting all to the native one. *)
{$push}
{$warnings off}
for I := 1 to Length (Pa) do
if CharInSet(Pa [I], AllowDirectorySeparators) then
Pa [I] := DirectorySeparator;
{$warnings on}
{$pop}
{$ENDIF not FPC_FEXPAND_SYSUTILS}
(* PathStart is amount of characters to strip to get beginning *)

View File

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

View File

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