From ef3e79e0bb6ba4a5e5d4dc1467281370e1d8b488 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sat, 23 Aug 2008 22:54:42 +0200 Subject: Fix some compiler warnings --- UCore.pas | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'UCore.pas') diff --git a/UCore.pas b/UCore.pas index cc298ea..447392a 100644 --- a/UCore.pas +++ b/UCore.pas @@ -120,7 +120,7 @@ type TWorkerThread = class(TThread) end; TOpenDirThread = class(TThread) - private + protected procedure Execute; override; public AEngine: TPanelEngine; @@ -410,7 +410,6 @@ function ChangeDir(Engine: TPanelEngine; Path: string; var SelItem: string; cons var APath: string; Error : integer; begin - Result := 1; try APath := Engine.Path; if Path = '..' then GoUp(APath) @@ -585,6 +584,7 @@ end; // Return False to break the process function CopyFilesWorker_ProgressFunc(Sender: Pointer; BytesDone: Int64): boolean; cdecl; begin + Result := True; // DebugMsg(['*** CopyFilesWorker: ProgressFunc called (Sender=', QWord(Sender), ', BytesDone=', BytesDone, ')']); try if Assigned(Sender) and (TObject(Sender) is TWorkerThread) then @@ -726,6 +726,7 @@ var DefResponse: integer; // Global variables for this function function LocalCopyFile(SourceFile, DestFile: string; Append: boolean): boolean; var DataSrc, DataDest: PDataItemSL; begin + Result := False; try with SenderThread do begin if ((SrcEngine is TLocalTreeEngine) and (DestEngine is TLocalTreeEngine)) or @@ -774,10 +775,10 @@ var DefResponse: integer; // Global variables for this function function DoOperation(AFileRec: PDataItemSL; const Dst: string; var ErrorKind: integer; const Append: boolean): integer; begin - try ErrorKind := 0; Result := 0; - with SenderThread do + try + with SenderThread do with AFileRec^ do begin if IsLnk then begin // Explicit copy the file @@ -2698,8 +2699,8 @@ var Handle : PDIR; StatBuf : Pstat64; Buf : PChar; begin + Result := True; try - Result := True; APath := IncludeTrailingPathDelimiter(APath); Handle := opendir(PChar(APath)); if not Assigned(Handle) then begin -- cgit v1.2.3