IDE: quick fixes for 5036,5037,5057..5060,5090..5094: does not seem to be initialized

git-svn-id: trunk@48080 -
This commit is contained in:
mattias 2015-03-01 14:18:24 +00:00
parent 3584c167ee
commit d6f218a8d3
23 changed files with 21 additions and 134 deletions

View File

@ -260,16 +260,35 @@ end;
function TQuickFixLocalVarNotInitialized_AddAssignment.IsApplicable(
Msg: TMessageLine; out Identifier: string): boolean;
function IsMsgId(MsgID: integer): boolean;
var
Dummy: string;
begin
Result:=TIDEFPCParser.MsgLineIsId(Msg,MsgID,Identifier,Dummy);
end;
var
Tool: TCodeTool;
CleanPos: integer;
Node: TCodeTreeNode;
Dummy: string;
Code: TCodeBuffer;
begin
Result:=false;
// Check: Local variable "$1" does not seem to be initialized
if not TIDEFPCParser.MsgLineIsId(Msg,5036,Identifier,Dummy) then
if not IsMsgId(5036) // W_Local variable "$1" does not seem to be initialized
or not IsMsgId(5037) // W_Variable "$1" does not seem to be initialized
or not IsMsgId(5057) // H_Local variable "$1" does not seem to be initialized
or not IsMsgId(5058) // H_Variable "$1" does not seem to be initialized
or not IsMsgId(5059) // W_Function result variable does not seem to initialized
or not IsMsgId(5060) // H_Function result variable does not seem to be initialized
or not IsMsgId(5089) // W_Local variable "$1" of a managed type does not seem to be initialized
or not IsMsgId(5090) // W_Variable "$1" of a managed type does not seem to be initialized
or not IsMsgId(5091) // H_Local variable "$1" of a managed type does not seem to be initialized
or not IsMsgId(5092) // H_Variable "$1" of a managed type does not seem to be initialized
or not IsMsgId(5093) // W_function result variable of a managed type does not seem to initialized
or not IsMsgId(5094) // H_Function result variable of a managed type does not seem to be initialized
then
exit;
if not Msg.HasSourcePosition or not IsValidIdent(Identifier) then exit;

View File

@ -1572,12 +1572,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1534,12 +1534,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1535,12 +1535,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1570,12 +1570,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1528,12 +1528,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1532,12 +1532,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1584,12 +1584,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1530,12 +1530,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1571,12 +1571,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1534,12 +1534,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1561,12 +1561,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1561,12 +1561,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1564,12 +1564,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1576,12 +1576,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1542,12 +1542,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1523,12 +1523,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1558,12 +1558,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1536,12 +1536,6 @@ msgstr "%s МБ"
msgid "Name"
msgstr "Имя"
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr "Размер"

View File

@ -1571,12 +1571,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1571,12 +1571,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1561,12 +1561,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""

View File

@ -1577,12 +1577,6 @@ msgstr ""
msgid "Name"
msgstr ""
#: lclstrconsts.sshellctrlsselecteditemdoesnotexists
msgid ""
"The selected item does not exist on disk:\n"
"\"%s\"\n"
msgstr ""
#: lclstrconsts.sshellctrlssize
msgid "Size"
msgstr ""