diff --git a/components/codetools/fileprocs.pas b/components/codetools/fileprocs.pas index 9ff6cd560a..148c406365 100644 --- a/components/codetools/fileprocs.pas +++ b/components/codetools/fileprocs.pas @@ -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); diff --git a/components/mpaslex/mpaslex.pp b/components/mpaslex/mpaslex.pp index 17c3b8cf90..f331877a12 100644 --- a/components/mpaslex/mpaslex.pp +++ b/components/mpaslex/mpaslex.pp @@ -1398,6 +1398,7 @@ function TmwPasLex.GetToken: string; var Len: Longint; begin + Result := ''; Len:=Run-fTokenPos; SetString(Result, (FOrigin+fTokenPos), Len); end; diff --git a/components/synedit/syneditkeycmds.pp b/components/synedit/syneditkeycmds.pp index b96cac0cb5..ad361b2a6c 100644 --- a/components/synedit/syneditkeycmds.pp +++ b/components/synedit/syneditkeycmds.pp @@ -529,6 +529,7 @@ end; function EditorCommandToCodeString(Cmd: TSynEditorCommand): string; begin + Result := ''; if not EditorCommandToIdent(Cmd, Result) then Result := IntToStr(Cmd); end; diff --git a/components/synedit/syneditmiscclasses.pp b/components/synedit/syneditmiscclasses.pp index f9f992d25f..121d73649c 100644 --- a/components/synedit/syneditmiscclasses.pp +++ b/components/synedit/syneditmiscclasses.pp @@ -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 diff --git a/components/synedit/synedittextbuffer.pp b/components/synedit/synedittextbuffer.pp index 745dc46935..0cd635e06b 100644 --- a/components/synedit/synedittextbuffer.pp +++ b/components/synedit/synedittextbuffer.pp @@ -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 diff --git a/components/synedit/synhighlightercpp.pp b/components/synedit/synhighlightercpp.pp index 111692f44f..e1abe56bf3 100644 --- a/components/synedit/synhighlightercpp.pp +++ b/components/synedit/synhighlightercpp.pp @@ -1419,6 +1419,7 @@ function TSynCppSyn.GetToken: String; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlightercss.pas b/components/synedit/synhighlightercss.pas index 7f4d2da08e..ad484eb018 100644 --- a/components/synedit/synhighlightercss.pas +++ b/components/synedit/synhighlightercss.pas @@ -1655,6 +1655,7 @@ function TSynCssSyn.GetToken: string; var Len: LongInt; begin + Result := ''; Len := Run - FTokenPos; SetString(Result, (FLine + FTokenPos), Len); end; diff --git a/components/synedit/synhighlighterhtml.pp b/components/synedit/synhighlighterhtml.pp index d8bc1d74f7..1f445ee182 100644 --- a/components/synedit/synhighlighterhtml.pp +++ b/components/synedit/synhighlighterhtml.pp @@ -2217,6 +2217,7 @@ function TSynHTMLSyn.GetToken: string; var len: Longint; begin + Result := ''; Len := (Run - fTokenPos); SetString(Result, (FLine + fTokenPos), len); end; diff --git a/components/synedit/synhighlighterjava.pas b/components/synedit/synhighlighterjava.pas index e7fd252ff5..ff87a2762d 100644 --- a/components/synedit/synhighlighterjava.pas +++ b/components/synedit/synhighlighterjava.pas @@ -1307,6 +1307,7 @@ function TSynJavaSyn.GetToken: String; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlighterlfm.pas b/components/synedit/synhighlighterlfm.pas index 63c4d83350..aefecc163d 100644 --- a/components/synedit/synhighlighterlfm.pas +++ b/components/synedit/synhighlighterlfm.pas @@ -494,6 +494,7 @@ function TSynLFMSyn.GetToken: String; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlighterperl.pas b/components/synedit/synhighlighterperl.pas index a8fe320b61..c6234f61d3 100644 --- a/components/synedit/synhighlighterperl.pas +++ b/components/synedit/synhighlighterperl.pas @@ -2537,6 +2537,7 @@ function TSynPerlSyn.GetToken: string; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlighterphp.pas b/components/synedit/synhighlighterphp.pas index dfa78f8427..8f5cca64b3 100644 --- a/components/synedit/synhighlighterphp.pas +++ b/components/synedit/synhighlighterphp.pas @@ -1360,6 +1360,7 @@ function TSynPHPSyn.GetToken: String; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlighterpython.pas b/components/synedit/synhighlighterpython.pas index c5bc747967..d09051217c 100644 --- a/components/synedit/synhighlighterpython.pas +++ b/components/synedit/synhighlighterpython.pas @@ -1188,6 +1188,7 @@ function TSynPythonSyn.GetToken: string; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlightersql.pas b/components/synedit/synhighlightersql.pas index 3881e9570d..81bac9217f 100644 --- a/components/synedit/synhighlightersql.pas +++ b/components/synedit/synhighlightersql.pas @@ -1450,6 +1450,7 @@ function TSynSQLSyn.GetToken: string; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; Setstring(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlightertex.pas b/components/synedit/synhighlightertex.pas index 7a51a6fa2b..b47e611988 100644 --- a/components/synedit/synhighlightertex.pas +++ b/components/synedit/synhighlightertex.pas @@ -334,6 +334,7 @@ function TSynTeXSyn.GetToken: String; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; { GetToken } diff --git a/components/synedit/synhighlighterunixshellscript.pas b/components/synedit/synhighlighterunixshellscript.pas index 1929a62f92..dc04c9a7d5 100644 --- a/components/synedit/synhighlighterunixshellscript.pas +++ b/components/synedit/synhighlighterunixshellscript.pas @@ -706,6 +706,7 @@ function TSynUNIXShellScriptSyn.GetToken: string; var Len: LongInt; begin + Result := ''; Len := Run - fTokenPos; SetString(Result, (FLine + fTokenPos), Len); end; diff --git a/components/synedit/synhighlighterxml.pas b/components/synedit/synhighlighterxml.pas index 8c6309be4c..cce0e43e15 100644 --- a/components/synedit/synhighlighterxml.pas +++ b/components/synedit/synhighlighterxml.pas @@ -803,6 +803,7 @@ function TSynXMLSyn.GetToken: string; var len: Longint; begin + Result := ''; Len := (Run - fTokenPos); SetString(Result, (FLine + fTokenPos), len); end; diff --git a/components/synedit/synregexpr.pas b/components/synedit/synregexpr.pas index d0024c46ac..3e6570ee25 100644 --- a/components/synedit/synregexpr.pas +++ b/components/synedit/synregexpr.pas @@ -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 diff --git a/designer/designerprocs.pas b/designer/designerprocs.pas index f2ae59cde0..eaf9188c25 100644 --- a/designer/designerprocs.pas +++ b/designer/designerprocs.pas @@ -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; diff --git a/ide/diffpatch.pas b/ide/diffpatch.pas index cc6ab12517..b1e6c225d1 100644 --- a/ide/diffpatch.pas +++ b/ide/diffpatch.pas @@ -535,6 +535,7 @@ var Len1, Len2: integer; DiffOutput: TDiffOutput; begin + Result := ''; DiffOutput:=TDiffOutput.Create(OutputType); DiffOutput.Text1:=Text1; DiffOutput.Text2:=Text2; diff --git a/lcl/controls.pp b/lcl/controls.pp index 284787abcd..b99826e601 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -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 diff --git a/lcl/graphics.pp b/lcl/graphics.pp index 1b0c80f7cb..0edf0f4f0d 100644 --- a/lcl/graphics.pp +++ b/lcl/graphics.pp @@ -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 diff --git a/lcl/include/customlistview.inc b/lcl/include/customlistview.inc index 19a2ca11df..18f7f8f5eb 100644 --- a/lcl/include/customlistview.inc +++ b/lcl/include/customlistview.inc @@ -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 diff --git a/lcl/include/picture.inc b/lcl/include/picture.inc index 6ee6725a09..eec07498cb 100644 --- a/lcl/include/picture.inc +++ b/lcl/include/picture.inc @@ -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; diff --git a/lcl/include/pixmap.inc b/lcl/include/pixmap.inc index d8b280344b..a8a6f845c4 100644 --- a/lcl/include/pixmap.inc +++ b/lcl/include/pixmap.inc @@ -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 diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index f1a920cc84..492c2b411e 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -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 diff --git a/packager/installpkgsetdlg.pas b/packager/installpkgsetdlg.pas index bd8424e15f..49ef596beb 100644 --- a/packager/installpkgsetdlg.pas +++ b/packager/installpkgsetdlg.pas @@ -454,6 +454,7 @@ end; function TInstallPkgSetDialog.CheckSelection: boolean; begin + Result := False; OnCheckInstallPackageList(FNewInstalledPackages,Result); end; diff --git a/packager/packagedefs.pas b/packager/packagedefs.pas index 736b8eee13..efe7175a22 100644 --- a/packager/packagedefs.pas +++ b/packager/packagedefs.pas @@ -1214,6 +1214,7 @@ end; function GetDependencyOwnerAsString(Dependency: TPkgDependency): string; begin + Result := ''; OnGetDependencyOwnerDescription(Dependency,Result); end;