fixed a few fpc over warnings from Andrew Haines

git-svn-id: trunk@7284 -
This commit is contained in:
mattias 2005-06-25 15:34:03 +00:00
parent f155c43b35
commit 54f8a04166
28 changed files with 53 additions and 3 deletions

View File

@ -1283,6 +1283,7 @@ function TFileStateCache.FileExistsCached(const Filename: string): boolean;
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(Filename,fsciExists,AFile,Result) then exit;
Result:=FileExists(AFile.Filename);
SetFlag(AFile,fsciExists,Result);
@ -1296,6 +1297,7 @@ function TFileStateCache.DirPathExistsCached(const Filename: string): boolean;
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(Filename,fsciDirectory,AFile,Result) then exit;
Result:=DirPathExists(AFile.Filename);
SetFlag(AFile,fsciDirectory,Result);
@ -1306,6 +1308,7 @@ function TFileStateCache.DirectoryIsWritableCached(const DirectoryName: string
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(DirectoryName,fsciDirectoryWritable,AFile,Result) then exit;
Result:=DirectoryIsWritable(AFile.Filename);
SetFlag(AFile,fsciDirectoryWritable,Result);
@ -1316,6 +1319,7 @@ function TFileStateCache.FileIsExecutableCached(
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(AFilename,fsciExecutable,AFile,Result) then exit;
Result:=FileIsExecutable(AFile.Filename);
SetFlag(AFile,fsciExecutable,Result);
@ -1325,6 +1329,7 @@ function TFileStateCache.FileIsReadableCached(const AFilename: string): boolean;
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(AFilename,fsciReadable,AFile,Result) then exit;
Result:=FileIsReadable(AFile.Filename);
SetFlag(AFile,fsciReadable,Result);
@ -1334,6 +1339,7 @@ function TFileStateCache.FileIsWritableCached(const AFilename: string): boolean;
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(AFilename,fsciWritable,AFile,Result) then exit;
Result:=FileIsWritable(AFile.Filename);
SetFlag(AFile,fsciWritable,Result);
@ -1343,6 +1349,7 @@ function TFileStateCache.FileIsTextCached(const AFilename: string): boolean;
var
AFile: TFileStateCacheItem;
begin
Result := False;
if Check(AFilename,fsciText,AFile,Result) then exit;
Result:=FileIsText(AFile.Filename);
SetFlag(AFile,fsciText,Result);

View File

@ -1398,6 +1398,7 @@ function TmwPasLex.GetToken: string;
var
Len: Longint;
begin
Result := '';
Len:=Run-fTokenPos;
SetString(Result, (FOrigin+fTokenPos), Len);
end;

View File

@ -529,6 +529,7 @@ end;
function EditorCommandToCodeString(Cmd: TSynEditorCommand): string;
begin
Result := '';
if not EditorCommandToIdent(Cmd, Result) then
Result := IntToStr(Cmd);
end;

View File

@ -306,6 +306,7 @@ function TSynGutter.FormatLineNumber(Line: integer): string;
var
i: integer;
begin
Result := '';
if fZeroStart then Dec(Line);
Str(Line : fAutoSizeDigitCount, Result);
if fLeadingZeros then

View File

@ -337,6 +337,7 @@ function TSynEditFileReader.ReadLine: string;
var
E, P, S: PChar;
begin
Result := '';
repeat
S := PChar(@fBuffer[fBufPtr]);
if S[0] = #0 then begin

View File

@ -1419,6 +1419,7 @@ function TSynCppSyn.GetToken: String;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -1655,6 +1655,7 @@ function TSynCssSyn.GetToken: string;
var
Len: LongInt;
begin
Result := '';
Len := Run - FTokenPos;
SetString(Result, (FLine + FTokenPos), Len);
end;

View File

@ -2217,6 +2217,7 @@ function TSynHTMLSyn.GetToken: string;
var
len: Longint;
begin
Result := '';
Len := (Run - fTokenPos);
SetString(Result, (FLine + fTokenPos), len);
end;

View File

@ -1307,6 +1307,7 @@ function TSynJavaSyn.GetToken: String;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -494,6 +494,7 @@ function TSynLFMSyn.GetToken: String;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -2537,6 +2537,7 @@ function TSynPerlSyn.GetToken: string;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -1360,6 +1360,7 @@ function TSynPHPSyn.GetToken: String;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -1188,6 +1188,7 @@ function TSynPythonSyn.GetToken: string;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -1450,6 +1450,7 @@ function TSynSQLSyn.GetToken: string;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
Setstring(Result, (FLine + fTokenPos), Len);
end;

View File

@ -334,6 +334,7 @@ function TSynTeXSyn.GetToken: String;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end; { GetToken }

View File

@ -706,6 +706,7 @@ function TSynUNIXShellScriptSyn.GetToken: string;
var
Len: LongInt;
begin
Result := '';
Len := Run - fTokenPos;
SetString(Result, (FLine + fTokenPos), Len);
end;

View File

@ -803,6 +803,7 @@ function TSynXMLSyn.GetToken: string;
var
len: Longint;
begin
Result := '';
Len := (Run - fTokenPos);
SetString(Result, (FLine + fTokenPos), len);
end;

View File

@ -1615,6 +1615,7 @@ function TRegExpr.GetMatchLen (Idx : integer) : integer;
function TRegExpr.GetMatch (Idx : integer) : RegExprString;
begin
Result := '';
if (Idx >= 0) and (Idx < NSUBEXP) and Assigned (fInputString)
and Assigned (startp [Idx]) and Assigned (endp [Idx])
//then Result := copy (fInputString, MatchPos [Idx], MatchLen [Idx]) //###0.929

View File

@ -289,10 +289,9 @@ end;
function ComponentIsInvisible(AComponent: TComponent): boolean;
begin
Result:=false;
if Assigned(OnComponentIsInvisible) then
OnComponentIsInvisible(AComponent,Result)
else
Result:=false;
OnComponentIsInvisible(AComponent,Result);
end;
function ComponentIsNonVisual(AComponent: TComponent): boolean;

View File

@ -535,6 +535,7 @@ var
Len1, Len2: integer;
DiffOutput: TDiffOutput;
begin
Result := '';
DiffOutput:=TDiffOutput.Create(OutputType);
DiffOutput.Text1:=Text1;
DiffOutput.Text2:=Text2;

View File

@ -2325,6 +2325,7 @@ const
function CursorToString(Cursor: TCursor): string;
begin
Result := '';
if not CursorToIdent(Cursor, Result) then FmtStr(Result, '%d', [Cursor]);
end;
@ -2913,6 +2914,9 @@ end.
{ =============================================================================
$Log$
Revision 1.302 2005/06/25 15:34:03 mattias
fixed a few fpc over warnings from Andrew Haines
Revision 1.301 2005/06/25 15:30:33 mattias
fixed changing BorderSpacing at designtime and borderspacing Align=alTop,alLeft

View File

@ -1651,12 +1651,14 @@ end;
function ColorToString(Color: TColor): AnsiString;
begin
Result := '';
if not ColorToIdent(Color, Result) then
Result:='$'+HexStr(Color,8);
end;
function StringToColor(const S: shortstring): TColor;
begin
Result := clNone;
if not IdentToColor(S, Longint(Result)) then
Result := TColor(StrToInt(S));
end;
@ -1928,6 +1930,9 @@ end.
{ =============================================================================
$Log$
Revision 1.176 2005/06/25 15:34:03 mattias
fixed a few fpc over warnings from Andrew Haines
Revision 1.175 2005/06/22 09:45:59 mattias
implemented saving alpha bmp and using transparency for IDE glyph editor

View File

@ -332,6 +332,7 @@ var
Str2: String;
ListView: TCustomListView;
begin
Result := 0;
ListView := TListItem(Item1).Owner.Owner;
if Assigned(ListView.FOnCompare) then begin
ListView.FOnCompare(ListView, TListItem(Item1), TListItem(Item2),0 ,Result);
@ -752,6 +753,9 @@ end;
{ =============================================================================
$Log$
Revision 1.47 2005/06/25 15:34:03 mattias
fixed a few fpc over warnings from Andrew Haines
Revision 1.46 2005/04/22 08:19:39 mattias
added TListItems.FindCaption partstart parameter

View File

@ -288,6 +288,7 @@ function GraphicFilter(GraphicClass: TGraphicClass): string;
var
Filters: string;
begin
Result := '';
GetPicFileFormats.BuildFilterStrings(GraphicClass,Result,Filters);
end;
@ -309,6 +310,7 @@ function GraphicFileMask(GraphicClass: TGraphicClass): string;
var
Descriptions: string;
begin
Result := '';
GetPicFileFormats.BuildFilterStrings(GraphicClass,Descriptions,Result);
end;

View File

@ -110,6 +110,7 @@ var
SrcLen, SrcPos, DestPos, LineCount, CurLine, LineLen: integer;
LineStart: PChar;
begin
Result := nil;
// trim all comments and symbols and extract only the xpm data between ""
SrcLen:=length(XPM);
SetLength(TrimmedXPM,SrcLen+1); // +1 because TrimmedXPM should be at least
@ -288,6 +289,9 @@ end;
{ =============================================================================
$Log$
Revision 1.32 2005/06/25 15:34:03 mattias
fixed a few fpc over warnings from Andrew Haines
Revision 1.31 2005/06/22 09:45:59 mattias
implemented saving alpha bmp and using transparency for IDE glyph editor

View File

@ -4363,6 +4363,7 @@ end;
------------------------------------------------------------------------------}
function TWinControl.RealGetText: TCaption;
begin
Result := '';
if not HandleAllocated
or (csLoading in ComponentState)
or (not TWSWinControlClass(WidgetSetClass).GetText(Self, Result))
@ -4378,6 +4379,7 @@ end;
------------------------------------------------------------------------------}
function TWinControl.GetTextLen: Integer;
begin
Result := 0;
if not HandleAllocated
or (csLoading in ComponentState)
or not TWSWinControlClass(WidgetSetClass).GetTextLen(Self, Result)
@ -4515,6 +4517,9 @@ end;
{ =============================================================================
$Log$
Revision 1.329 2005/06/25 15:34:03 mattias
fixed a few fpc over warnings from Andrew Haines
Revision 1.328 2005/06/25 15:30:33 mattias
fixed changing BorderSpacing at designtime and borderspacing Align=alTop,alLeft

View File

@ -454,6 +454,7 @@ end;
function TInstallPkgSetDialog.CheckSelection: boolean;
begin
Result := False;
OnCheckInstallPackageList(FNewInstalledPackages,Result);
end;

View File

@ -1214,6 +1214,7 @@ end;
function GetDependencyOwnerAsString(Dependency: TPkgDependency): string;
begin
Result := '';
OnGetDependencyOwnerDescription(Dependency,Result);
end;