aboutsummaryrefslogtreecommitdiffstats
path: root/Game
diff options
context:
space:
mode:
Diffstat (limited to 'Game')
-rw-r--r--Game/Code/Classes/UCommon.pas4
-rw-r--r--Game/Code/Classes/UMain.pas4
2 files changed, 7 insertions, 1 deletions
diff --git a/Game/Code/Classes/UCommon.pas b/Game/Code/Classes/UCommon.pas
index 7eefedac..89b5623f 100644
--- a/Game/Code/Classes/UCommon.pas
+++ b/Game/Code/Classes/UCommon.pas
@@ -736,6 +736,7 @@ type
* supports an alignment "x" of up to 8 bytes only whereas FPC supports
* alignments on 16 and 32 byte boundaries too.
*)
+{$WARNINGS OFF}
function GetAlignedMem(Size: cardinal; Alignment: integer): Pointer;
var
OrigPtr: Pointer;
@@ -766,12 +767,15 @@ begin
// set header with info on old pointer for FreeMem
PMemAlignHeader(PtrUInt(Result) - SizeOf(TMemAlignHeader))^ := OrigPtr;
end;
+{$WARNINGS ON}
+{$WARNINGS OFF}
procedure FreeAlignedMem(P: Pointer);
begin
if (P <> nil) then
FreeMem(PMemAlignHeader(PtrUInt(P) - SizeOf(TMemAlignHeader))^);
end;
+{$WARNINGS ON}
initialization
diff --git a/Game/Code/Classes/UMain.pas b/Game/Code/Classes/UMain.pas
index 7e403b22..135113b5 100644
--- a/Game/Code/Classes/UMain.pas
+++ b/Game/Code/Classes/UMain.pas
@@ -984,6 +984,7 @@ procedure InitializePaths;
// Initialize a path variable
// After setting paths, make sure that paths exist
+ {$WARN SYMBOL_PLATFORM OFF}
function initialize_path( out aPathVar : string; const aLocation : string ): boolean;
var
lWriteable: Boolean;
@@ -1002,12 +1003,13 @@ procedure InitializePaths;
lWriteable := (lAttrib and faDirectory <> 0) and
not (lAttrib and faReadOnly <> 0)
end;
-
+
if not lWriteable then
Log.LogError('Dir ('+ aLocation +') is Readonly', 'initialize_path');
result := lWriteable;
end;
+ {$WARN SYMBOL_PLATFORM ON}
begin
initialize_path( LogPath , Platform.GetLogPath );