removing unused local variables
authortupshin <tupshin@tupshin.com>
Thu, 5 Feb 2004 01:14:08 +0000 (01:14 +0000)
committertupshin <tupshin@tupshin.com>
Thu, 5 Feb 2004 01:14:08 +0000 (01:14 +0000)
darcs-hash:20040205011408-a9258-949687c31cd9c2b18a15137a0c40fc890333e490.gz

src/org/ibex/HTTP.java
src/org/ibex/Ibex.java
src/org/ibex/Main.java
src/org/ibex/Surface.java
src/org/ibex/VectorGraphics.java
src/org/ibex/js/JSFunction.java
src/org/ibex/js/Lexer.java
src/org/ibex/js/Parser.java
src/org/ibex/plat/OpenGL.java
src/org/ibex/util/CAB.java
src/org/ibex/util/SSL.java

index 8242653..5cf4e3a 100644 (file)
@@ -268,7 +268,6 @@ public class HTTP {
         if (Log.verbose) Log.info(this, "evaluating PAC script");
         String pac = null;
         try {
         if (Log.verbose) Log.info(this, "evaluating PAC script");
         String pac = null;
         try {
-            org.ibex.js.JSArray args = new org.ibex.js.JSArray();
             Object obj = pacFunc.call(url.toString(), url.getHost(), null, null, 2);
             if (Log.verbose) Log.info(this, "  PAC script returned \"" + obj + "\"");
             pac = obj.toString();
             Object obj = pacFunc.call(url.toString(), url.getHost(), null, null, 2);
             if (Log.verbose) Log.info(this, "  PAC script returned \"" + obj + "\"");
             pac = obj.toString();
index 9431f1f..0e04205 100644 (file)
@@ -213,7 +213,6 @@ public final class Ibex extends JS.Cloneable {
     public static void sleep(final int i) throws JSExn {
         try {
             final JS.UnpauseCallback callback = JS.pause();
     public static void sleep(final int i) throws JSExn {
         try {
             final JS.UnpauseCallback callback = JS.pause();
-            final long currentTime = System.currentTimeMillis();
             // FEATURE use a single sleeper thread
             new Thread() { public void run() {
                 try { Thread.sleep(i); } catch (InterruptedException e) { }
             // FEATURE use a single sleeper thread
             new Thread() { public void run() {
                 try { Thread.sleep(i); } catch (InterruptedException e) { }
index 74b4b3f..4a53a44 100644 (file)
@@ -74,7 +74,6 @@ public class Main {
 
         if (Log.on) Log.info(Main.class, "loading xwar");
         final Ibex ibex = new Ibex(rr);
 
         if (Log.on) Log.info(Main.class, "loading xwar");
         final Ibex ibex = new Ibex(rr);
-        final JS final_rr = (JS)ibex.get("");
 
         scarImage =
             Picture.load((Stream)Main.builtin.get("org/ibex/builtin/scar.png"),
 
         scarImage =
             Picture.load((Stream)Main.builtin.get("org/ibex/builtin/scar.png"),
index 383e7a8..2d577e6 100644 (file)
@@ -88,7 +88,6 @@ public abstract class Surface extends PixelBuffer implements Scheduler.Task {
         if (button == 1) new Message("_Press1", T, root);
         else if (button == 2) new Message("_Press2", T, root);
         else if (button == 3) {
         if (button == 1) new Message("_Press1", T, root);
         else if (button == 2) new Message("_Press2", T, root);
         else if (button == 3) {
-            final Box who = root;
             Scheduler.add(new Scheduler.Task() { public void perform() throws JSExn {
                 Platform.clipboardReadEnabled = true;
                 try {
             Scheduler.add(new Scheduler.Task() { public void perform() throws JSExn {
                 Platform.clipboardReadEnabled = true;
                 try {
index a634b67..79fecba 100644 (file)
@@ -663,7 +663,6 @@ public final class VectorGraphics {
             while (pt.hasMoreTokens()) v.addElement(new Float(pt.parseFloat()));
             float[] dashes = new float[v.size() % 2 == 0 ? v.size() : 2 * v.size()];
             for(int i=0; i<dashes.length; i++) dashes[i] = ((Float)v.elementAt(i % v.size())).floatValue();
             while (pt.hasMoreTokens()) v.addElement(new Float(pt.parseFloat()));
             float[] dashes = new float[v.size() % 2 == 0 ? v.size() : 2 * v.size()];
             for(int i=0; i<dashes.length; i++) dashes[i] = ((Float)v.elementAt(i % v.size())).floatValue();
-            float length = 0;
             int dashpos = dashOffset;
             boolean on = dashpos % 2 == 0;
             for(int i=0; i<numvertices; i++) {
             int dashpos = dashOffset;
             boolean on = dashpos % 2 == 0;
             for(int i=0; i<numvertices; i++) {
index 6c0e89a..4e6a48d 100644 (file)
@@ -28,7 +28,6 @@ class JSFunction extends JS implements ByteCodes, Tokens, org.ibex.Scheduler.Tas
     /** if you enqueue a function, it gets invoked in its own pauseable context */
     public void perform() throws JSExn {
         Interpreter i = new Interpreter(this, true, new JSArray());
     /** if you enqueue a function, it gets invoked in its own pauseable context */
     public void perform() throws JSExn {
         Interpreter i = new Interpreter(this, true, new JSArray());
-        int oldpausecount = i.pausecount;
         i.resume();
     }
 
         i.resume();
     }
 
index bf350db..5aab728 100644 (file)
@@ -202,7 +202,6 @@ class Lexer implements Tokens {
     private int getString(int c) throws IOException {
         StringBuffer stringBuf = null;
         int quoteChar = c;
     private int getString(int c) throws IOException {
         StringBuffer stringBuf = null;
         int quoteChar = c;
-        int val = 0;
         c = in.read();
         in.startString(); // start after the first "
         while(c != quoteChar) {
         c = in.read();
         in.startString(); // start after the first "
         while(c != quoteChar) {
index a00f3a0..932c5b8 100644 (file)
@@ -192,7 +192,6 @@ class Parser extends Lexer implements ByteCodes {
             int i = 0;
             if (peekToken() != RB)
                 while(true) {                                               // iterate over the initialization values
             int i = 0;
             if (peekToken() != RB)
                 while(true) {                                               // iterate over the initialization values
-                    int size = b.size;
                     b.add(parserLine, LITERAL, JS.N(i++));           // push the index in the array to place it into
                     if (peekToken() == COMMA || peekToken() == RB)
                         b.add(parserLine, LITERAL, null);                   // for stuff like [1,,2,]
                     b.add(parserLine, LITERAL, JS.N(i++));           // push the index in the array to place it into
                     if (peekToken() == COMMA || peekToken() == RB)
                         b.add(parserLine, LITERAL, null);                   // for stuff like [1,,2,]
@@ -390,8 +389,6 @@ class Parser extends Lexer implements ByteCodes {
             
             startExpr(b,  precedence[tok]);
             
             
             startExpr(b,  precedence[tok]);
             
-            int size = b.size;
-            
             if (tok != ADD_TRAP && tok != DEL_TRAP) {
                 // tok-1 is always s/^ASSIGN_// (0 is BITOR, 1 is ASSIGN_BITOR, etc) 
                 b.add(parserLine, tok - 1, tok-1==ADD ? JS.N(2) : null);
             if (tok != ADD_TRAP && tok != DEL_TRAP) {
                 // tok-1 is always s/^ASSIGN_// (0 is BITOR, 1 is ASSIGN_BITOR, etc) 
                 b.add(parserLine, tok - 1, tok-1==ADD ? JS.N(2) : null);
@@ -743,7 +740,6 @@ class Parser extends Lexer implements ByteCodes {
                     if (peekToken() != RP) {
                         // extended Ibex catch block: catch(e faultCode "foo.bar.baz")
                         consume(NAME);
                     if (peekToken() != RP) {
                         // extended Ibex catch block: catch(e faultCode "foo.bar.baz")
                         consume(NAME);
-                        String propName = string;
                         b.add(parserLine, DUP);
                         b.add(parserLine, LITERAL, string);
                         b.add(parserLine, GET);
                         b.add(parserLine, DUP);
                         b.add(parserLine, LITERAL, string);
                         b.add(parserLine, GET);
index 51ef708..cea181a 100644 (file)
@@ -253,8 +253,6 @@ abstract class OpenGL {
         private static final int min(int a, int b) { return a < b ? a : b; }
         
         public void draw(int dx, int dy, int cx1, int cy1, int cx2, int cy2) {
         private static final int min(int a, int b) { return a < b ? a : b; }
         
         public void draw(int dx, int dy, int cx1, int cy1, int cx2, int cy2) {
-            int totalWidth = width;
-            int totalHeight = height;
             // *{x,y}{1,2} key: d=dest s=src, p=bounds of this picture, i=intersection of s and p, pd = dest of this pic
             for(int i=0;i<pics.length;i++) {
                 for(int j=0;j<pics[i].length;j++) {
             // *{x,y}{1,2} key: d=dest s=src, p=bounds of this picture, i=intersection of s and p, pd = dest of this pic
             for(int i=0;i<pics.length;i++) {
                 for(int j=0;j<pics[i].length;j++) {
index 96e0947..98aa340 100644 (file)
@@ -51,7 +51,6 @@ public class CAB {
                 CFFILE file = (CFFILE)h.folders[i].files.elementAt(j);
                 if (file.fileName.equals(fileName)) return new LimitStream(is2, file.fileSize);
                 byte[] b = new byte[file.fileSize];
                 CFFILE file = (CFFILE)h.folders[i].files.elementAt(j);
                 if (file.fileName.equals(fileName)) return new LimitStream(is2, file.fileSize);
                 byte[] b = new byte[file.fileSize];
-                int read = is2.read(b);
             }
         }
 
             }
         }
 
@@ -384,7 +383,6 @@ public class CAB {
         }
 
         InputStream readBlock() throws IOException {
         }
 
         InputStream readBlock() throws IOException {
-            int checksum = readLittleInt(dis);
             int compressedBytes = readLittleShort(dis);
             int unCompressedBytes = readLittleShort(dis);
             byte[] reserved = new byte[/*folder.header.perDatablockReservedSize*/0];
             int compressedBytes = readLittleShort(dis);
             int unCompressedBytes = readLittleShort(dis);
             byte[] reserved = new byte[/*folder.header.perDatablockReservedSize*/0];
index dff780a..25c76ac 100644 (file)
@@ -321,7 +321,6 @@ public class SSL extends Socket {
 
                 byte[] rec = readHandshake();
                 handshakes = concat(new byte[][] { handshakes, rec });
 
                 byte[] rec = readHandshake();
                 handshakes = concat(new byte[][] { handshakes, rec });
-                DataInputStream stream = new DataInputStream(new ByteArrayInputStream(rec, 4, rec.length - 4));
 
                 switch(rec[0]) {
                 case 2: // ServerHello
 
                 switch(rec[0]) {
                 case 2: // ServerHello
@@ -370,7 +369,6 @@ public class SSL extends Socket {
                         if (server_cert == null) {
                             server_cert = this_cert;
                             TBSCertificateStructure tbs = server_cert.getTBSCertificate();
                         if (server_cert == null) {
                             server_cert = this_cert;
                             TBSCertificateStructure tbs = server_cert.getTBSCertificate();
-                            X509Name subject = tbs.getSubject();
 
                             // gross hack to extract the Common Name so we can compare it to the server hostname
                             String CN = tbs.getSubject().toString() + " ";
 
                             // gross hack to extract the Common Name so we can compare it to the server hostname
                             String CN = tbs.getSubject().toString() + " ";