Browse Source

Explicitly ignore unused return values

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@8486 8c9fc860-2736-0410-a75d-ab315db34111
negelef 6 năm trước cách đây
mục cha
commit
a170611d98

+ 6 - 6
source/Windows.ADVAPI32.Mod

@@ -154,11 +154,11 @@ VAR
 			NIL,0,NIL,NIL,NIL);
 		IF newService = Kernel32.NULL THEN
 			err := OutError("Advapi32.CreateService");
-			CloseServiceHandle(scm);
+			IGNORE CloseServiceHandle(scm);
 			RETURN FALSE;
 		END;
-		CloseServiceHandle(newService);
-		CloseServiceHandle(scm);
+		IGNORE CloseServiceHandle(newService);
+		IGNORE CloseServiceHandle(scm);
 		KernelLog.Enter;
 		KernelLog.String('Service "'); KernelLog.String(srvName); KernelLog.String('" was installed!'); KernelLog.Ln;
 		KernelLog.Exit;
@@ -188,9 +188,9 @@ VAR
 					KernelLog.String('Service "'); KernelLog.String(srvName); KernelLog.String('" was removed!'); KernelLog.Ln;
 					KernelLog.Exit;
 				END;
-				CloseServiceHandle(service);
+				IGNORE CloseServiceHandle(service);
 			END;
-			CloseServiceHandle(scm);
+			IGNORE CloseServiceHandle(scm);
 			RETURN TRUE
 		END
 	END UninstallService;
@@ -210,7 +210,7 @@ VAR
 	PROCEDURE TermMod;
 	BEGIN
 		IF advapi32 # Kernel32.NULL THEN
-			Kernel32.FreeLibrary(advapi32); advapi32 := Kernel32.NULL
+			IGNORE Kernel32.FreeLibrary(advapi32); advapi32 := Kernel32.NULL
 		END
 	END TermMod;
 

+ 1 - 1
source/Windows.Clipboard.Mod

@@ -45,7 +45,7 @@ VAR
 BEGIN
 	ASSERT((text # NIL) & (text.HasReadLock()));
 	IF User32.OpenClipboard(Kernel32.NULL) # Kernel32.False THEN
-		User32.EmptyClipboard;
+		IGNORE User32.EmptyClipboard ();
 		size := text.GetLength();
 		NEW(chBuff, size + 1);
 		(* UTF-8 encoding. String is truncated in case of multi-byte encoded characters! *)

+ 9 - 8
source/Windows.Display.Mod

@@ -1133,8 +1133,9 @@ VAR
 			Strings.Append( disp.desc, ts );  Strings.Append( disp.desc, "x" );  Strings.IntToStr( disp.format, ts );
 			Strings.Append( disp.desc, ts );  Strings.Append( disp.desc, ")" );  create.finished := FALSE;
 			CreateWin( create );
-			User32.SetWindowText(root.hWnd, windowTitle);
-			User32.BringWindowToTop( root.hWnd );  User32.SetForegroundWindow( root.hWnd );
+			IGNORE User32.SetWindowText(root.hWnd, windowTitle);
+			IGNORE User32.BringWindowToTop( root.hWnd );
+			IGNORE User32.SetForegroundWindow( root.hWnd );
 			Displays.registry.Add( disp, res );
 			ASSERT ( res = 0 );
 			IF fullscreen THEN
@@ -1157,20 +1158,20 @@ VAR
 			create.y := y;  create.w := w;  create.h := h + User32.GetSystemMetrics( User32.SMCYCaption );
 			create.finished := FALSE;
 			CreateWin( create );
-			User32.SetWindowText(root.hWnd, windowTitle);
-			User32.BringWindowToTop( root.hWnd );  disp.Update;
-			User32.SetForegroundWindow( root.hWnd );
+			IGNORE User32.SetWindowText(root.hWnd, windowTitle);
+			IGNORE User32.BringWindowToTop( root.hWnd );  disp.Update;
+			IGNORE User32.SetForegroundWindow( root.hWnd );
 		ELSE
 			KernelLog.Enter;  KernelLog.String( "Display: Display already open, window still open" );  KernelLog.Exit;
-			IF minimized IN root.state THEN User32.ShowWindow( root.hWnd, User32.SWRestore );  END;
+			IF minimized IN root.state THEN IGNORE User32.ShowWindow( root.hWnd, User32.SWRestore );  END;
 
-			User32.BringWindowToTop( root.hWnd );  User32.SetForegroundWindow( root.hWnd );
+			IGNORE User32.BringWindowToTop( root.hWnd ); IGNORE User32.SetForegroundWindow( root.hWnd );
 		END;
 
 		hDC := User32.GetDC(0);
 		disp.unit := GDI32.GetDeviceCaps(hDC,GDI32.LogPixelsX);
 		disp.unit := ENTIER((36000.0*disp.unit)/25.4);
-		User32.ReleaseDC(0,hDC);
+		IGNORE User32.ReleaseDC(0,hDC);
 	END DoInstall;
 
 	PROCEDURE Install*(context : Commands.Context); (** ["H"] [ width [height] ] ["FULLSCREEN"] [ x [y] ] *)

+ 5 - 5
source/Windows.Machine.Mod

@@ -630,7 +630,7 @@ BEGIN
 	SetupTraceName(traceName);
 	Trace.String("trace -> file "); Trace.String(traceName); Trace.Ln;
 	hout := Kernel32.CreateFile(traceName, {Kernel32.GenericWrite}, {Kernel32.FileShareRead}, NIL, Kernel32.CreateAlways, {Kernel32.FileAttributeNormal}, Kernel32.NULL);
-	Kernel32.GetFullPathName(traceName, LEN(traceName),traceName, NIL);
+	IGNORE Kernel32.GetFullPathName(traceName, LEN(traceName),traceName, NIL);
 	Trace.Char := TraceChar;
 	Trace.String(version); Trace.Ln; 
 END SetTraceFile;
@@ -717,7 +717,7 @@ END RemoveTraceFile;
 PROCEDURE ToExecutablePath(CONST name: ARRAY OF CHAR; VAR fullName: ARRAY OF CHAR);
 VAR i,j: LONGINT;
 BEGIN
-	Kernel32.GetModuleFileName(Kernel32.hInstance, fullName, LEN( fullName ) );
+	IGNORE Kernel32.GetModuleFileName(Kernel32.hInstance, fullName, LEN( fullName ) );
 	j := -1; i := 0;
 	WHILE fullName[i] # 0X DO
 		IF fullName[i] = '\' THEN j := i END;
@@ -768,7 +768,7 @@ BEGIN
 	IF hfile = Kernel32.InvalidHandleValue THEN
 		ToExecutablePath(UserConfigFile, userConfigFile);
 	ELSE
-		Kernel32.CloseHandle(hfile)
+		IGNORE Kernel32.CloseHandle(hfile)
 	END;
 
 	(*
@@ -1007,8 +1007,8 @@ BEGIN
 		END;
 		memBlock.next := NIL;
 		startAdr := memBlock.startAdr; (* this value must be cached for the second call of Kernel32.VirtualFree *)
-		Kernel32.VirtualFree(SYSTEM.VAL(LONGINT, memBlock.startAdr), memBlock.size, {Kernel32.MEMDecommit});
-		Kernel32.VirtualFree(SYSTEM.VAL(LONGINT, startAdr ), 0, {Kernel32.MEMRelease});
+		IGNORE Kernel32.VirtualFree(SYSTEM.VAL(LONGINT, memBlock.startAdr), memBlock.size, {Kernel32.MEMDecommit});
+		IGNORE Kernel32.VirtualFree(SYSTEM.VAL(LONGINT, startAdr ), 0, {Kernel32.MEMRelease});
 	ELSE
 		HALT(535)	(* error in memory block management *)
 	END;

+ 7 - 7
source/Windows.Oberon.Clipboard.Mod

@@ -20,7 +20,7 @@ MODULE Clipboard IN Oberon; (** non-portable / source: Windows.Clipboard.Mod *)
 			R: Texts.Reader; ch: CHAR;
 	BEGIN
 		IF User32.OpenClipboard(0) # Kernel32.False THEN
-			User32.EmptyClipboard();
+			IGNORE User32.EmptyClipboard();
 			IF CFOberon # Kernel32.NULL THEN
 				NEW(buf); Texts.OpenBuf(buf); Texts.Save(T, beg, end, buf);
 				NEW(t); Texts.Open(t, ""); Texts.Append(t, buf);
@@ -34,7 +34,7 @@ MODULE Clipboard IN Oberon; (** non-portable / source: Windows.Clipboard.Mod *)
 					SYSTEM.PUT(adr, ch); INC(adr);
 					Files.Read(r, ch)
 				END;
-				Kernel32.GlobalUnlock(hMem);
+				IGNORE Kernel32.GlobalUnlock(hMem);
 				hMem := User32.SetClipboardData(CFOberon, hMem)
 			END;
 			Texts.OpenReader(R, T, beg); size := 0;
@@ -55,9 +55,9 @@ MODULE Clipboard IN Oberon; (** non-portable / source: Windows.Clipboard.Mod *)
 				END
 			END;
 			SYSTEM.PUT(adr, 0X);
-			Kernel32.GlobalUnlock(hMem);
+			IGNORE Kernel32.GlobalUnlock(hMem);
 			hMem := User32.SetClipboardData(User32.CFText, hMem);
-			User32.CloseClipboard()
+			IGNORE User32.CloseClipboard()
 		END
 	END PutToClipboard;
 
@@ -83,7 +83,7 @@ MODULE Clipboard IN Oberon; (** non-portable / source: Windows.Clipboard.Mod *)
 					SYSTEM.GET(adr, ch); INC(adr); Files.Write(r, ch);
 					DEC(i)
 				END;
-				Kernel32.GlobalUnlock(hMem);
+				IGNORE Kernel32.GlobalUnlock(hMem);
 				Files.Set(r, f, 0); Files.ReadLInt(r, i); Files.Read(r, ch);
 				NEW(T); Texts.Load(T, f, Files.Pos(r), i)
 			ELSE
@@ -97,11 +97,11 @@ MODULE Clipboard IN Oberon; (** non-portable / source: Windows.Clipboard.Mod *)
 						IF ch = 0DX THEN INC(adr) END;
 						SYSTEM.GET(adr, ch); INC(adr)
 					END;
-					Kernel32.GlobalUnlock(hMem);
+					IGNORE Kernel32.GlobalUnlock(hMem);
 					Texts.Append(T, W.buf)
 				END
 			END;
-			User32.CloseClipboard()
+			IGNORE User32.CloseClipboard()
 		END
 	END GetFromClipboard;
 

+ 13 - 13
source/Windows.Oberon.Registry.Mod

@@ -62,7 +62,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 		ELSE
 			res := Failed
 		END;
-		ADVAPI32.RegCloseKey(hKey)
+		IGNORE ADVAPI32.RegCloseKey(hKey)
 	END SetKeyValue;
 
 	(** Retrieve the value stored under key. use key = "" to retrieve the default value for path. *)
@@ -77,7 +77,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 		IF (type # ADVAPI32.RegSZ) OR (ret # ADVAPI32.Success) THEN
 			IF (type = ADVAPI32.RegSZ) & (ret = ADVAPI32.ErrorMoreData) THEN
 				NEW(buf, len+1);
-				ADVAPI32.RegQueryValueEx(hKey, key, NIL, type, buf^, len);
+				IGNORE ADVAPI32.RegQueryValueEx(hKey, key, NIL, type, buf^, len);
 				COPY(buf^, value); res := Done
 			ELSE
 				res := NotFound
@@ -85,7 +85,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 		ELSE
 			res := Done
 		END;
-		ADVAPI32.RegCloseKey(hKey)
+		IGNORE ADVAPI32.RegCloseKey(hKey)
 	END GetKeyValue;
 
 	(** Delete key and its value, key = "" deletes the default value for path. *)
@@ -100,7 +100,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 		ELSE
 			res := NotFound
 		END;
-		ADVAPI32.RegCloseKey(hKey)
+		IGNORE ADVAPI32.RegCloseKey(hKey)
 	END DeleteKeyValue;
 
 	(** Recursive delete all sub-paths, keys and values in path.
@@ -115,11 +115,11 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 		WHILE ADVAPI32.RegEnumKeyEx(hKey, 0, buffer, size, NIL, NIL, NIL, NIL) = ADVAPI32.Success DO
 			DeletePath(hKey, buffer);
 			IF res # Done THEN
-				ADVAPI32.RegCloseKey(hKey); RETURN
+				IGNORE ADVAPI32.RegCloseKey(hKey); RETURN
 			END;
 			size := Kernel32.MaxPath
 		END;
-		ADVAPI32.RegCloseKey(hKey);
+		IGNORE ADVAPI32.RegCloseKey(hKey);
 		IF ADVAPI32.RegDeleteKey(root, path) = ADVAPI32.Success THEN
 			INC(stamp); res := Done
 		ELSE
@@ -142,7 +142,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 			IF ret = ADVAPI32.Success THEN enum(subPath) END;
 			INC(i)
 		END;
-		ADVAPI32.RegCloseKey(hKey); res := Done
+		IGNORE ADVAPI32.RegCloseKey(hKey); res := Done
 	END EnumeratePath;
 
 	(** Enumerate all key/value pairs in path.*)
@@ -162,7 +162,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 			IF (ret = ADVAPI32.Success) & (type = ADVAPI32.RegSZ) THEN enum(key, value) END;
 			INC(i)
 		END;
-		ADVAPI32.RegCloseKey(hKey); res := Done
+		IGNORE ADVAPI32.RegCloseKey(hKey); res := Done
 	END EnumerateKeyValue;
 
 	PROCEDURE OutputFileString(VAR str: ARRAY OF CHAR);
@@ -170,7 +170,7 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 	BEGIN
 		n := 0; WHILE str[n] # 0X DO INC(n) END;
 		b := Kernel32.WriteFile(hFile, str, n, n, NIL);
-		IF logfile THEN Kernel32.FlushFileBuffers(hFile) END
+		IF logfile THEN IGNORE Kernel32.FlushFileBuffers(hFile) END
 	END OutputFileString;
 
 	(*
@@ -237,16 +237,16 @@ MODULE Registry IN Oberon; (** non-portable / source: Win32.Registry.Mod *)	(* e
 			buf: POINTER TO ARRAY OF SYSTEM.BYTE; adr: ADDRESS; len, i: LONGINT; ch: CHAR;
 	BEGIN
 		res := Done; stamp := 0;
-		Kernel32.GetModuleFileName(Kernel32.hInstance, file, Kernel32.MaxPath);
+		IGNORE Kernel32.GetModuleFileName(Kernel32.hInstance, file, Kernel32.MaxPath);
 		len := ADVAPI32.GetFileVersionInfoSize(file, NIL);
 
 		NEW(buf, len);
 
-		ADVAPI32.GetFileVersionInfo(file, 0, len, buf^);
-		ADVAPI32.VerQueryValue(buf^, "\StringFileInfo\040904e4\FileDescription", adr, len);
+		IGNORE ADVAPI32.GetFileVersionInfo(file, 0, len, buf^);
+		IGNORE ADVAPI32.VerQueryValue(buf^, "\StringFileInfo\040904e4\FileDescription", adr, len);
 		IF len >= Kernel32.MaxPath THEN HALT(99) END;
 		SYSTEM.MOVE(adr, ADDRESSOF(software), len);
-		ADVAPI32.VerQueryValue(buf^, "\StringFileInfo\040904e4\FileVersion", adr, len);
+		IGNORE ADVAPI32.VerQueryValue(buf^, "\StringFileInfo\040904e4\FileVersion", adr, len);
 		IF len >= Kernel32.MaxPath THEN HALT(99) END;
 		SYSTEM.MOVE(adr, ADDRESSOF(version), len);
 		(* cmd  { "-" name [ "=" value ] } *)

+ 2 - 2
source/Windows.Objects.Mod

@@ -400,7 +400,7 @@ TYPE
 				END
 			END;
 		END;
-		IF event # 0 THEN Kernel32.CloseHandle(event); END;
+		IF event # 0 THEN IGNORE Kernel32.CloseHandle(event); END;
 	END FinalizerCaller;
 
 VAR
@@ -666,7 +666,7 @@ END ExcpFrmHandler;
 PROCEDURE RemoveExcpFrm( VAR excpfrm: Kernel32.ExcpFrm );
 VAR this: Kernel32.ExcpFrmPtr;
 BEGIN
-	Kernel32.RemoveVectoredContinueHandler(ExcpFrmHandler);
+	IGNORE Kernel32.RemoveVectoredContinueHandler(ExcpFrmHandler);
 END RemoveExcpFrm;
 
 PROCEDURE InstallExcpFrm( VAR excpfrm: Kernel32.ExcpFrm );

+ 6 - 6
source/Windows.SVNAdmin.Mod

@@ -996,9 +996,9 @@ END CheckChecksum;
 			Files.JoinPath ( path, name, dest );
 			Strings.Append ( dest, ".svn-base" );
 
-			Kernel32.SetFileAttributes ( dest, {} );
+			IGNORE Kernel32.SetFileAttributes ( dest, {} );
 			Files.CopyFile ( file, dest, overwrite, res );
-			Kernel32.SetFileAttributes ( dest, {Files.ReadOnly} );
+			IGNORE Kernel32.SetFileAttributes ( dest, {Files.ReadOnly} );
 			ASSERT ( res = Files.Ok );
 		END;
 	END CopyToBaseFile;
@@ -1007,24 +1007,24 @@ END CheckChecksum;
 
 	PROCEDURE SetFileAttribute* ( file : ARRAY OF CHAR );
 	BEGIN
-		Kernel32.SetFileAttributes ( file, {Files.ReadOnly} );
+		IGNORE Kernel32.SetFileAttributes ( file, {Files.ReadOnly} );
 	END SetFileAttribute;
 
 	PROCEDURE RemoveFileAttribute* ( file : ARRAY OF CHAR );
 	BEGIN
-		Kernel32.SetFileAttributes ( file, {} );
+		IGNORE Kernel32.SetFileAttributes ( file, {} );
 	END RemoveFileAttribute;
 
 
 	PROCEDURE SetFileAttribute2* ( file : ARRAY OF CHAR; f : Files.File );
 	BEGIN
-		Kernel32.SetFileAttributes ( file, {Files.ReadOnly} );
+		IGNORE Kernel32.SetFileAttributes ( file, {Files.ReadOnly} );
 		INCL ( f.flags, Files.ReadOnly );
 	END SetFileAttribute2;
 
 	PROCEDURE RemoveFileAttribute2* ( file : ARRAY OF CHAR; f : Files.File );
 	BEGIN
-		Kernel32.SetFileAttributes ( file, {} );
+		IGNORE Kernel32.SetFileAttributes ( file, {} );
 		EXCL ( f.flags, Files.ReadOnly );
 	END RemoveFileAttribute2;
 

+ 1 - 1
source/Windows.Shell32.Mod

@@ -37,7 +37,7 @@ MODULE Shell32; (** non-portable / source: Windows.Shell32.Mod *)
 	PROCEDURE TermMod;
 	BEGIN
 		IF shell32 # Kernel32.NULL THEN
-			Kernel32.FreeLibrary(shell32); shell32 := Kernel32.NULL
+			IGNORE Kernel32.FreeLibrary(shell32); shell32 := Kernel32.NULL
 		END
 	END TermMod;
 

+ 7 - 7
source/Windows.V24.Mod

@@ -350,9 +350,9 @@ TYPE
 		PROCEDURE ClearMC*( s: SET );
 		BEGIN {EXCLUSIVE}
 			IF (handle # Kernel32.InvalidHandleValue) THEN
-				IF Serials.Break IN s THEN Kernel32.ClearCommBreak( handle ) END;
-				IF Serials.DTR IN s THEN Kernel32.EscapeCommFunction( handle, Kernel32.CLRDTR ) END;
-				IF Serials.RTS IN s THEN Kernel32.EscapeCommFunction( handle, Kernel32.CLRRTS ) END
+				IF Serials.Break IN s THEN IGNORE Kernel32.ClearCommBreak( handle ) END;
+				IF Serials.DTR IN s THEN IGNORE Kernel32.EscapeCommFunction( handle, Kernel32.CLRDTR ) END;
+				IF Serials.RTS IN s THEN IGNORE Kernel32.EscapeCommFunction( handle, Kernel32.CLRRTS ) END
 			END
 		END ClearMC;
 
@@ -394,10 +394,10 @@ TYPE
 		PROCEDURE Close*;
 		BEGIN {EXCLUSIVE}
 			IF handle # Kernel32.InvalidHandleValue THEN
-				Kernel32.CancelIoEx(handle, NIL);
-				Kernel32.CloseHandle( handle );  handle := Kernel32.InvalidHandleValue;
-				IF rOverlapped.hEvent # NIL THEN Kernel32.CloseHandle(rOverlapped.hEvent); rOverlapped.hEvent := NIL; END;
-				IF wOverlapped.hEvent # NIL THEN Kernel32.CloseHandle(wOverlapped.hEvent); wOverlapped.hEvent := NIL; END;
+				IGNORE Kernel32.CancelIoEx(handle, NIL);
+				IGNORE Kernel32.CloseHandle( handle );  handle := Kernel32.InvalidHandleValue;
+				IF rOverlapped.hEvent # NIL THEN IGNORE Kernel32.CloseHandle(rOverlapped.hEvent); rOverlapped.hEvent := NIL; END;
+				IF wOverlapped.hEvent # NIL THEN IGNORE Kernel32.CloseHandle(wOverlapped.hEvent); wOverlapped.hEvent := NIL; END;
 			END
 		END Close;
 

+ 2 - 2
source/Windows.WSock32.Mod

@@ -225,10 +225,10 @@ MODULE WSock32; (* AUTHOR "ejz, additions Alex Popescu"; PURPOSE " Win32 WSock32
 	PROCEDURE TermMod;
 	BEGIN
 		IF wsock32 # Kernel32.NULL THEN
-			Kernel32.FreeLibrary(wsock32); wsock32 := Kernel32.NULL
+			IGNORE Kernel32.FreeLibrary(wsock32); wsock32 := Kernel32.NULL
 		END;
 		IF wship6 # Kernel32.NULL THEN
-			Kernel32.FreeLibrary(wship6); wship6 := Kernel32.NULL
+			IGNORE Kernel32.FreeLibrary(wship6); wship6 := Kernel32.NULL
 		END
 	END TermMod;
 

+ 3 - 3
source/Windows.WinDisks.Mod

@@ -54,7 +54,7 @@ TYPE
 
 		PROCEDURE Finish( VAR res: WORD );
 		BEGIN
-			Kernel32.CloseHandle( handle );  KernelLog.String("Disk closed"); KernelLog.Ln;
+			IGNORE Kernel32.CloseHandle( handle );  KernelLog.String("Disk closed"); KernelLog.Ln;
 		END Finish;
 
 		PROCEDURE Transfer*( op, block, num: LONGINT;  VAR data: ARRAY OF CHAR;  ofs: LONGINT;  VAR res: WORD );
@@ -348,7 +348,7 @@ VAR
 			END;
 			GetPhysicalDrive( handle, flags,diskname, context );
 			IF ~GetDiskGeometry( handle, pdg ) THEN
-				Kernel32.CloseHandle( handle );
+				IGNORE Kernel32.CloseHandle( handle );
 				context.error.String( "Could not determine disk geometry " );  context.error.Ln;
 				context.result := Commands.CommandError;
 			ELSE
@@ -365,7 +365,7 @@ VAR
 					AddDisk( vd );
 					context.out.String( diskname );  context.out.String( " registered." ); context.out.Ln;
 				ELSE
-					Kernel32.CloseHandle( handle );
+					IGNORE Kernel32.CloseHandle( handle );
 					context.error.String( "Could not register disk, res: " ); context.error.Int( res, 0 ); context.error.Ln;
 					context.result := Commands.CommandError;
 				END;

+ 18 - 18
source/Windows.WinFS.Mod

@@ -302,7 +302,7 @@ TYPE
 					t := 0;  d := 0;
 					REPEAT
 						IF Files.EnumTime IN flags THEN
-							Kernel32.FileTimeToLocalFileTime( FD.ftLastWriteTime, ft );  Kernel32.FileTimeToSystemTime( ft, st );
+							IGNORE Kernel32.FileTimeToLocalFileTime( FD.ftLastWriteTime, ft ); IGNORE  Kernel32.FileTimeToSystemTime( ft, st );
 							d := LONG( st.wYear - 1900 ) * 200H + LONG( st.wMonth ) * 20H + LONG( st.wDay );  t := LONG( st.wHour ) * 1000H + LONG( st.wMinute ) * 40H + LONG( st.wSecond );
 						END;
 						Join( curPath, "/", FD.cFileName, longname );
@@ -312,7 +312,7 @@ TYPE
 							enum.PutEntry( longname, {Files.Directory}, t, d, FD.nFileSizeLow )
 						END;
 					UNTIL Kernel32.FindNextFile( h, FD ) = Kernel32.False;
-					Kernel32.FindClose( h )
+					IGNORE Kernel32.FindClose( h )
 				END;
 			END EnumeratePath;
 
@@ -966,11 +966,11 @@ VAR
 		VAR ch: CHAR; i: LONGINT;
 		BEGIN
 			IF (dir[0] = "~") & (dir[1] = PathDelimiter) THEN
-				Kernel32.SetCurrentDirectory( sysPath );
+				IGNORE Kernel32.SetCurrentDirectory( sysPath );
 				i := 2;
 				REPEAT ch := dir[i]; dir[i-2] := ch; INC(i) UNTIL ch = 0X;
 			ELSE
-				Kernel32.SetCurrentDirectory(workPath) 
+				IGNORE Kernel32.SetCurrentDirectory(workPath) 
 			END;
 		END SetSysPath;
 		
@@ -983,7 +983,7 @@ VAR
 				ConvertChar( dir, Files.PathDelimiter, PathDelimiter );
 				SetSysPath(dir);
 				IF Kernel32.SetCurrentDirectory( dir ) # Kernel32.False THEN
-					Kernel32.GetCurrentDirectory( LEN( dir ), dir );  searchPath[i] := ";";  INC( i );  k := 0;
+					IGNORE Kernel32.GetCurrentDirectory( LEN( dir ), dir );  searchPath[i] := ";";  INC( i );  k := 0;
 					WHILE dir[k] # 0X DO searchPath[i] := dir[k];  INC( i );  INC( k ) END
 				END;
 				k := 0
@@ -994,14 +994,14 @@ VAR
 		Machine.GetConfig( "Paths.Files", files ); Machine.GetConfig( "Paths.Search", directories );
 		Machine.GetConfig( "Paths.Temp", temp ); Machine.GetConfig( "Paths.Work", work );
 
-		Kernel32.GetCurrentDirectory( LEN( workPath ), workPath );  i := 0;  ret := 0;
+		IGNORE Kernel32.GetCurrentDirectory( LEN( workPath ), workPath );  i := 0;  ret := 0;
 
 		IF files # "" THEN
 			COPY( files, sysPath );
 			IF Kernel32.SetCurrentDirectory( sysPath ) # Kernel32.False THEN ret := Kernel32.GetCurrentDirectory( LEN( sysPath ), sysPath ) END
 		END;
 		IF ret = 0 THEN
-			Kernel32.GetModuleFileName( Kernel32.hInstance, sysPath, LEN( sysPath ) );  j := -1;
+			IGNORE Kernel32.GetModuleFileName( Kernel32.hInstance, sysPath, LEN( sysPath ) );  j := -1;
 			WHILE sysPath[i] # 0X DO
 				IF sysPath[i] = PathDelimiter THEN j := i END;
 				INC( i )
@@ -1028,15 +1028,15 @@ VAR
 			SetSysPath(tempPath);
 			IF Kernel32.SetCurrentDirectory( tempPath ) # Kernel32.False THEN ret := Kernel32.GetCurrentDirectory( LEN( tempPath ), tempPath ) END
 		END;
-		IF ret = 0 THEN Kernel32.GetTempPath( LEN( tempPath ), tempPath ) END;
+		IF ret = 0 THEN IGNORE Kernel32.GetTempPath( LEN( tempPath ), tempPath ) END;
 
 		COPY( work, dir );
 		IF dir # "" THEN
 			ConvertChar( dir, Files.PathDelimiter, PathDelimiter );  
 			SetSysPath(dir);
-			IF Kernel32.SetCurrentDirectory( dir ) # Kernel32.False THEN Kernel32.GetCurrentDirectory( LEN( workPath ), workPath ) END
+			IF Kernel32.SetCurrentDirectory( dir ) # Kernel32.False THEN IGNORE Kernel32.GetCurrentDirectory( LEN( workPath ), workPath ) END
 		END;
-		Kernel32.SetCurrentDirectory( workPath );
+		IGNORE Kernel32.SetCurrentDirectory( workPath );
 	END SetPaths;
 
 	PROCEDURE SameName*( VAR a, b: ARRAY OF CHAR ): BOOLEAN;   (** non-portable *)
@@ -1058,7 +1058,7 @@ VAR
 		IF j > 0 THEN fullName[j] := 0X END;
 		BEGIN {EXCLUSIVE}
 			done := Kernel32.SetCurrentDirectory( fullName ) # Kernel32.False;
-			Kernel32.SetCurrentDirectory( workPath );  RETURN done
+			IGNORE Kernel32.SetCurrentDirectory( workPath );  RETURN done
 		END;
 	END CheckPath;
 
@@ -1091,25 +1091,25 @@ VAR
 
 	PROCEDURE SetAttributes*( file: ARRAY OF CHAR;  attrs: WORDSET );   (** non-portable *)
 	BEGIN
-		ConvertChar( file, Files.PathDelimiter, PathDelimiter );  Kernel32.SetFileAttributes( file, attrs )
+		ConvertChar( file, Files.PathDelimiter, PathDelimiter ); IGNORE Kernel32.SetFileAttributes( file, attrs )
 	END SetAttributes;
 
 	PROCEDURE SetFileAttributes*( file: ARRAY OF CHAR;  attrs: WORDSET );   (** non-portable *)
 	BEGIN
-		ConvertChar( file, Files.PathDelimiter, PathDelimiter );  Kernel32.SetFileAttributes( file, attrs )
+		ConvertChar( file, Files.PathDelimiter, PathDelimiter ); IGNORE Kernel32.SetFileAttributes( file, attrs )
 	END SetFileAttributes;
 
 
 (** Get the current directory. *)
 	PROCEDURE GetWorkingDirectory*( VAR path: ARRAY OF CHAR );
 	BEGIN {EXCLUSIVE}
-		Kernel32.GetCurrentDirectory( Kernel32.MaxPath, workPath );  COPY( workPath, path );  ConvertChar( path, PathDelimiter, Files.PathDelimiter ); FixDriveLetter (path);
+		IGNORE Kernel32.GetCurrentDirectory( Kernel32.MaxPath, workPath );  COPY( workPath, path );  ConvertChar( path, PathDelimiter, Files.PathDelimiter ); FixDriveLetter (path);
 	END GetWorkingDirectory;
 
 (** Change to directory path. *)
 	PROCEDURE ChangeDirectory*( path: ARRAY OF CHAR;  VAR done: BOOLEAN );
 	BEGIN {EXCLUSIVE}
-		ConvertChar( path, Files.PathDelimiter, PathDelimiter );  done := Kernel32.SetCurrentDirectory( path ) # Kernel32.False;  Kernel32.GetCurrentDirectory( Kernel32.MaxPath, workPath );
+		ConvertChar( path, Files.PathDelimiter, PathDelimiter );  done := Kernel32.SetCurrentDirectory( path ) # Kernel32.False; IGNORE Kernel32.GetCurrentDirectory( Kernel32.MaxPath, workPath );
 	END ChangeDirectory;
 
 (** Get the directory for temporary files. *)
@@ -1123,7 +1123,7 @@ VAR
 	VAR i, j, k, p: LONGINT;  fullName: FileName;  fileNamePart: Kernel32.LPSTR;
 	BEGIN
 		IF ~FindFile( fileName, fullName ) THEN  (* file does not exist -> would be created in the current dir *)
-			ConvertChar( fileName, Files.PathDelimiter, PathDelimiter );  Kernel32.GetFullPathName( fileName, Kernel32.MaxPath, fullName, fileNamePart ); FixDriveLetter (fullName);
+			ConvertChar( fileName, Files.PathDelimiter, PathDelimiter ); IGNORE Kernel32.GetFullPathName( fileName, Kernel32.MaxPath, fullName, fileNamePart ); FixDriveLetter (fullName);
 		ELSE ConvertChar( fullName, Files.PathDelimiter, PathDelimiter )
 		END;   (* from here on all with PathDelimiter and drive letter *)
  		IF CAP( workPath[0] ) # CAP( fullName[0] ) THEN  (* different drive letters -> nothing to be done *)
@@ -1200,14 +1200,14 @@ VAR
 		drives := drives - {0,1}; (* do not scan for diskettes *)
 		AutoMountWindowsLogicalDrives( drives );
 
-		Kernel32.GetCurrentDirectory( LEN( workPath ), workPath );  i := 0;  Kernel32.GetModuleFileName( Kernel32.hInstance, sysPath, LEN( sysPath ) );  j := -1;
+		IGNORE Kernel32.GetCurrentDirectory( LEN( workPath ), workPath );  i := 0; IGNORE Kernel32.GetModuleFileName( Kernel32.hInstance, sysPath, LEN( sysPath ) );  j := -1;
 		FixDriveLetter (workPath); FixDriveLetter (sysPath);
 		WHILE sysPath[i] # 0X DO
 			IF sysPath[i] = PathDelimiter THEN j := i END;
 			INC( i )
 		END;
 
-		i := j + 1;  sysPath[i] := 0X;  COPY( sysPath, searchPath );  Kernel32.GetTempPath( LEN( tempPath ), tempPath );  Kernel32.SetCurrentDirectory( workPath );
+		i := j + 1;  sysPath[i] := 0X;  COPY( sysPath, searchPath ); IGNORE Kernel32.GetTempPath( LEN( tempPath ), tempPath ); IGNORE Kernel32.SetCurrentDirectory( workPath );
 
 		notifications := NIL;
 	END Init;

+ 5 - 6
source/Windows.WinTrace.Mod

@@ -16,7 +16,7 @@ VAR b: Kernel32.BOOL;
 BEGIN
 	IF mode # none THEN
 		b := Kernel32.WriteFile (hout, buf[ofs], len, len, NIL);
-		Kernel32.FlushFileBuffers(hout);
+		IGNORE Kernel32.FlushFileBuffers(hout);
 	END;
 END Send;
 
@@ -26,7 +26,7 @@ VAR b: Kernel32.BOOL;
 BEGIN
 	IF mode # none THEN
 		b := Kernel32.WriteFile (herr, buf[ofs], len, len, NIL);
-		Kernel32.FlushFileBuffers(herr);
+		IGNORE Kernel32.FlushFileBuffers(herr);
 	END;
 END SendError;
 
@@ -52,18 +52,17 @@ BEGIN
 END Init;
 
 PROCEDURE Close*;
-VAR res: WORD;
 BEGIN
 	IF traceChar0 # NIL THEN
 		Trace.Char := traceChar0; 
 	END;
 	IF mode = console THEN
-		Kernel32.CloseHandle(hout);
+		IGNORE Kernel32.CloseHandle(hout);
 	#IF ~SHAREDLIB THEN
-		res := Kernel32.FreeConsole ();
+		IGNORE Kernel32.FreeConsole ();
 	#END;
 	ELSIF mode = file THEN
-		Kernel32.CloseHandle(hout);
+		IGNORE Kernel32.CloseHandle(hout);
 	END;
 	hout := Kernel32.InvalidHandleValue;
 	mode := none;