mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-16 09:49:31 +02:00
IDE: Recognize warnings from unknown compiler messages.
This commit is contained in:
parent
3c5ebb53bb
commit
0db4149e93
@ -58,6 +58,7 @@ type
|
||||
TCompiler = class(TObject)
|
||||
private
|
||||
FOnCmdLineCreate : TOnCmdLineCreate;
|
||||
procedure WriteError(const Msg: string);
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy; override;
|
||||
@ -65,7 +66,6 @@ type
|
||||
const WorkingDir, CompilerFilename, CompilerParams: string;
|
||||
BuildAll, SkipLinking, SkipAssembler, CurrentDirectoryIsTestDir: boolean;
|
||||
const aCompileHint: string): TModalResult;
|
||||
procedure WriteError(const Msg: string);
|
||||
end;
|
||||
|
||||
// Following classes are for compiler options parsed from "fpc -h" and "fpc -i".
|
||||
|
@ -1565,12 +1565,17 @@ end;
|
||||
function TIDEFPCParser.CheckForUnspecificStdErr(p: PChar): boolean;
|
||||
var
|
||||
MsgLine: TMessageLine;
|
||||
s: string;
|
||||
begin
|
||||
if not fMsgIsStdErr then exit(false);
|
||||
Result:=true;
|
||||
MsgLine:=CreateMsgLine;
|
||||
MsgLine.SubTool:=SubToolFPC;
|
||||
MsgLine.Urgency:=mluError;
|
||||
s:=p;
|
||||
if Pos('warning',s)>0 then
|
||||
MsgLine.Urgency:=mluWarning
|
||||
else
|
||||
MsgLine.Urgency:=mluError;
|
||||
MsgLine.Msg:=p;
|
||||
AddMsgLine(MsgLine);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user