1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Patch from Thomas F. Some patterns were marked

as error instead of warning.
This commit is contained in:
Alain Magloire 2003-12-15 21:40:36 +00:00
parent a8950694c7
commit dcdae63502

View file

@ -20,6 +20,8 @@ public class GLDErrorParser implements IErrorParser {
// 2- // 2-
// Something went wrong check if it is "ld" the linkeer bay cheching // Something went wrong check if it is "ld" the linkeer bay cheching
// the last letter for "ld" // the last letter for "ld"
// An example might be (not all are warnings):
// ntox86-ld: warning: libcpp.so.2, needed by C:/temp//libdisplay.so, may conflict with libcpp.so.3
int firstColon= line.indexOf(':'); int firstColon= line.indexOf(':');
if (firstColon != -1) { if (firstColon != -1) {
String buf= line.substring(0, firstColon); String buf= line.substring(0, firstColon);
@ -46,12 +48,20 @@ public class GLDErrorParser implements IErrorParser {
} }
eoParser.generateMarker(file, 0, desc, IMarkerGenerator.SEVERITY_ERROR_RESOURCE, null); eoParser.generateMarker(file, 0, desc, IMarkerGenerator.SEVERITY_ERROR_RESOURCE, null);
} else if (buf.endsWith("ld")){ } else if (buf.endsWith("ld")){
// By default treat the condition as fatal/error, unless marked as a warning
int errorType = IMarkerGenerator.SEVERITY_ERROR_RESOURCE;
desc = desc.trim();
if(desc.startsWith("warning") || desc.startsWith("Warning")) {
errorType = IMarkerGenerator.SEVERITY_WARNING;
}
String fileName = line.substring(0, firstColon); String fileName = line.substring(0, firstColon);
IFile file = eoParser.findFilePath(fileName); IFile file = eoParser.findFilePath(fileName);
if (file == null) { if (file == null) {
desc = fileName + " " + desc; desc = fileName + " " + desc;
} }
eoParser.generateMarker(file, 0, desc, IMarkerGenerator.SEVERITY_ERROR_RESOURCE, null);
eoParser.generateMarker(file, 0, desc, errorType, null);
} }
} }
return false; return false;