Jelajahi Sumber

Fix some (non important) warnings.

Martijn Laan 6 tahun lalu
induk
melakukan
2afbd7f08b
3 mengubah file dengan 9 tambahan dan 9 penghapusan
  1. 3 3
      Components/ASMInline.pas
  2. 3 3
      Projects/InstFunc.pas
  3. 3 3
      Projects/Undo.pas

+ 3 - 3
Components/ASMInline.pas

@@ -434,7 +434,7 @@ begin
     if alabel = nil then
       raise Exception.create('Unknown label ''' + labelref.labelname + '''');
 
-    fbuffer.seek(labelref.position, soFromBeginning);
+    fbuffer.seek(labelref.position, soBeginning);
     lw := alabel.position + labelref.delta;
     writelongword(lw);
 
@@ -458,9 +458,9 @@ begin
       reloc := Relocs[i];
       case reloc.relocType of
         rt32Bit: begin
-            fbuffer.Seek(reloc.position, soFromBeginning);
+            fbuffer.Seek(reloc.position, soBeginning);
             fbuffer.Read(orig, sizeof(orig));
-            fbuffer.seek(-sizeof(orig), soFromCurrent);
+            fbuffer.seek(-sizeof(orig), soCurrent);
             orig := LongWord(orig + diff);
             fbuffer.write(orig, sizeof(orig));
           end;

+ 3 - 3
Projects/InstFunc.pas

@@ -2,7 +2,7 @@ unit InstFunc;
 
 {
   Inno Setup
-  Copyright (C) 1997-2010 Jordan Russell
+  Copyright (C) 1997-2019 Jordan Russell
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
 
@@ -1336,7 +1336,7 @@ procedure RefreshEnvironment;
   changed. Based on code from KB article 104011.
   Note: Win9x's Explorer ignores this message. }
 var
-  MsgResult: DWORD;
+  MsgResult: DWORD_PTR;
 begin
   { Note: We originally used SendNotifyMessage to broadcast the message but it
     turned out that while it worked fine on NT 4 and 2000 it didn't work on XP
@@ -1345,7 +1345,7 @@ begin
     in the KB article 104011. It isn't as elegant since it could cause us to
     be delayed if another app is hung, but it'll have to do. }
   SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0,
-    LPARAM(PChar('Environment')), SMTO_ABORTIFHUNG, 5000, MsgResult);
+    LPARAM(PChar('Environment')), SMTO_ABORTIFHUNG, 5000, @MsgResult);
 end;
 
 procedure SplitNewParamStr(const Index: Integer; var AName, AValue: String);

+ 3 - 3
Projects/Undo.pas

@@ -2,7 +2,7 @@ unit Undo;
 
 {
   Inno Setup
-  Copyright (C) 1997-2008 Jordan Russell
+  Copyright (C) 1997-2019 Jordan Russell
   Portions by Martijn Laan
   For conditions of distribution and use, see LICENSE.TXT.
 
@@ -158,7 +158,7 @@ function ReadUninstallLogFlags(const F: TFile; const Filename: String): TUninsta
 implementation
 
 uses
-  Messages, ShlObj,
+  Messages, ShlObj, AnsiStrings,
   PathFunc, Struct, Msgs, MsgIDs, InstFunc, InstFnc2, RedirFunc, Compress,
   Logging, RegDLL, Helper, LibFusion;
 
@@ -1141,7 +1141,7 @@ begin
   end;
 {$ENDIF}
   if MaxDestBytes <> 0 then
-    StrPLCopy(Dest, AnsiString(Source), MaxDestBytes - 1);
+    AnsiStrings.StrPLCopy(Dest, AnsiString(Source), MaxDestBytes - 1);
   Result := (N + 1) * SizeOf(Dest^);
 end;