Просмотр исходного кода

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

git-svn-id: trunk@41960 -
pierre 6 лет назад
Родитель
Сommit
819752c334
4 измененных файлов с 8 добавлено и 4 удалено
  1. 2 1
      rtl/inc/dos.inc
  2. 2 1
      rtl/inc/fexpand.inc
  3. 2 1
      rtl/inc/ustrings.inc
  4. 2 1
      rtl/objpas/classes/streams.inc

+ 2 - 1
rtl/inc/dos.inc

@@ -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}
 
 

+ 2 - 1
rtl/inc/fexpand.inc

@@ -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 *)

+ 2 - 1
rtl/inc/ustrings.inc

@@ -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

+ 2 - 1
rtl/objpas/classes/streams.inc

@@ -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}