Warnings in message window get categorized as None
Original Reporter info from Mantis: chrisv5
-
Reporter name: Christian Vitroler
Original Reporter info from Mantis: chrisv5
- Reporter name: Christian Vitroler
Description:
Errors from FPC in the category (urgency in Lazarus/Codetools speak) warning get shown (and thus also filtered as mluNone).
Steps to reproduce:
program TestCompilerMessages;
function Test1(param1: string; param2: integer): string;
var
S: string;
begin
S := S + param1;
end;
begin
Test1('test', 1);
end.
Additional information:
Compile Project, Target: TestCompilerMessages.exe: Success, Warnings: 1, Hints: 1
TestCompilerMessages.lpr(7,8) None: Local variable "S" of a managed type does not seem to be initialized
TestCompilerMessages.lpr(3,32) Hint: Parameter "param2" not used
TestCompilerMessages.lpr(3,10) Warning: Function result does not seem to be set
13 lines compiled, 0.3 sec, 35088 bytes code, 1316 bytes data
There should be two warnings and one hint!
Error is in TIDEFPCParser.CheckForFileLineColMessage, the parser is looking for "Warn:", but FPC returns "Warning:" Not sure if this has changed with a certain version of FPC?
There is another place, namely TIDEFPCParser.CheckForGeneralMessage, with similar code. Not sure if it is relevant in other cases?
Mantis conversion info:
- Mantis ID: 34582
- OS: ALL
- OS Build: ALL
- Platform: ALL
- Version: 2.0RC2
- Fixed in revision: 59636 (#21986948)