rm dead code (Coverity)

This commit is contained in:
Terence Parr 2013-08-31 16:52:07 -07:00
parent 8bff26d758
commit 875fa0a31d
2 changed files with 2 additions and 8 deletions

View File

@ -353,7 +353,6 @@ public class ATNSerializer {
throw new UnsupportedOperationException(new InvalidClassException(ATN.class.getName(), reason));
}
int grammarType = ATNSimulator.toInt(data[p++]);
int maxType = ATNSimulator.toInt(data[p++]);
buf.append("max type ").append(maxType).append("\n");
int nstates = ATNSimulator.toInt(data[p++]);

View File

@ -37,14 +37,9 @@ import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.tool.ErrorType;
import org.antlr.v4.tool.Grammar;
import org.stringtemplate.v4.AutoIndentWriter;
import org.stringtemplate.v4.NumberRenderer;
import org.stringtemplate.v4.ST;
import org.stringtemplate.v4.STErrorListener;
import org.stringtemplate.v4.STGroup;
import org.stringtemplate.v4.STGroupFile;
import org.stringtemplate.v4.STWriter;
import org.stringtemplate.v4.StringRenderer;
import org.stringtemplate.v4.misc.STMessage;
import java.io.IOException;
import java.io.Writer;
@ -226,13 +221,13 @@ public class CodeGenerator {
public void write(ST code, String fileName) {
try {
long start = System.currentTimeMillis();
// long start = System.currentTimeMillis();
Writer w = tool.getOutputFileWriter(g, fileName);
STWriter wr = new AutoIndentWriter(w);
wr.setLineWidth(lineWidth);
code.write(wr);
w.close();
long stop = System.currentTimeMillis();
// long stop = System.currentTimeMillis();
}
catch (IOException ioe) {
tool.errMgr.toolError(ErrorType.CANNOT_WRITE_FILE,