1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Compiler warnings.

This commit is contained in:
Sergey Prigogin 2009-05-24 18:33:10 +00:00
parent af90f84dd0
commit fcf03e2a53

View file

@ -144,8 +144,7 @@ public class TestSourceReader {
return idx+offset; return idx+offset;
} }
return -1; return -1;
} } finally {
finally {
reader.close(); reader.close();
} }
} }
@ -162,8 +161,7 @@ public class TestSourceReader {
line++; line++;
} }
return line; return line;
} } finally {
finally {
reader.close(); reader.close();
} }
} }
@ -189,8 +187,7 @@ public class TestSourceReader {
if (found) { if (found) {
content.append(line); content.append(line);
content.append('\n'); content.append('\n');
} } else {
else {
line= line.trim(); line= line.trim();
if (line.startsWith("{" + tag)) { if (line.startsWith("{" + tag)) {
if (line.length() == tag.length()+1 || if (line.length() == tag.length()+1 ||
@ -199,8 +196,7 @@ public class TestSourceReader {
} }
} }
} }
} } else if (found) {
else if (found) {
break; break;
} }
line= reader.readLine(); line= reader.readLine();
@ -240,8 +236,7 @@ public class TestSourceReader {
if (file.getLocalTimeStamp() == timestamp) { if (file.getLocalTimeStamp() == timestamp) {
file.setLocalTimeStamp(timestamp+1000); file.setLocalTimeStamp(timestamp+1000);
} }
} } else {
else {
createFolders(file); createFolders(file);
file.create(stream, true, new NullProgressMonitor()); file.create(stream, true, new NullProgressMonitor());
} }
@ -297,8 +292,7 @@ public class TestSourceReader {
if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) { if (pfile != null && pfile.getTimestamp() >= file.getLocalTimeStamp()) {
return; return;
} }
} } finally {
finally {
index.releaseReadLock(); index.releaseReadLock();
} }
@ -312,10 +306,8 @@ public class TestSourceReader {
ICElement elem= project.findElement(file.getFullPath()); ICElement elem= project.findElement(file.getFullPath());
if (elem instanceof ITranslationUnit) { if (elem instanceof ITranslationUnit) {
ITranslationUnit tu= (ITranslationUnit) elem; ITranslationUnit tu= (ITranslationUnit) elem;
if (tu != null) {
return tu.getAST(index, ITranslationUnit.AST_SKIP_INDEXED_HEADERS); return tu.getAST(index, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
} }
}
Assert.fail("Could not create ast for " + file.getFullPath()); Assert.fail("Could not create ast for " + file.getFullPath());
return null; return null;
} }