[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] FW: [cdt-patch] Remove warnings (unused local variables) from gen erated parser.

Just wondering if any of the committers are applying these patches and, if
so, could you give notice when you do.

Thanks,
Doug Schaefer
Senior Staff Software Engineer
Rational - the software development company
Ottawa (Kanata), Ontario, Canada


-----Original Message-----
From: Chris McKillop [mailto:cdm@xxxxxxx] 
Sent: February 10, 2003 11:35 AM
To: cdt-patch@xxxxxxxxxxx
Subject: [cdt-patch] Remove warnings (unused local variables) from generated
parser.


Index: src/org/eclipse/cdt/internal/parser/generated/CPPParser.java
===================================================================
RCS file:
/home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/parser/generat
ed/CPPParser.java,v
retrieving revision 1.2
diff -u -r1.2 CPPParser.java
--- src/org/eclipse/cdt/internal/parser/generated/CPPParser.java	5
Feb 2003 20:29:01 -0000	1.2
+++ src/org/eclipse/cdt/internal/parser/generated/CPPParser.java	10
Feb 2003 23:24:07 -0000
@@ -109,7 +109,7 @@
   static final public void external_declaration() throws ParseException {
   boolean isTypedef = false;
   Token firstToken= getToken(1);
-  String name;
+  
     try {
       if (jj_2_5(2147483647)) {
         switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
@@ -385,7 +385,6 @@
  * need a structure that stores all the attributes.
  */
   static final public boolean declaration_specifiers() throws
ParseException {
-   Token t;
    boolean isTypedef = false, tmp;
     if (jj_2_32(1)) {
       label_3:
@@ -1057,7 +1056,6 @@
   boolean isTypedef = false;
   Token firstToken= getToken(1);
   Token t;
-  String name;
     try {
       if (jj_2_44(2147483647)) {
         declaration(true, firstToken);
@@ -1250,7 +1248,6 @@
   }
 
   static final public void enum_specifier() throws ParseException {
-  Token t;
     jj_consume_token(ENUM);
     switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
     case LCURLYBRACE:
@@ -1259,7 +1256,7 @@
       jj_consume_token(RCURLYBRACE);
       break;
     case ID:
-      t = jj_consume_token(ID);
+      jj_consume_token(ID);
       if (jj_2_58(2)) {
         jj_consume_token(LCURLYBRACE);
         enumerator_list();
@@ -1939,10 +1936,9 @@
   }
 
   static final public void template_parameter() throws ParseException {
-  Token t;
     if (jj_2_90(3)) {
       jj_consume_token(CLASS);
-      t = jj_consume_token(ID);
+      jj_consume_token(ID);
     } else if (jj_2_91(1)) {
       parameter_declaration();
     } else {
@@ -5627,8 +5623,6 @@
   }
 
   static final private boolean jj_3R_46() {
-    Token xsp;
-    xsp = jj_scanpos;
     lookingAhead = true;
     jj_semLA = isCtor();
     lookingAhead = false;
@@ -7176,8 +7170,6 @@
   }
 
   static final private boolean jj_3R_65() {
-    Token xsp;
-    xsp = jj_scanpos;
     lookingAhead = true;
     jj_semLA = isNotNull(getFullyScopedName());
     lookingAhead = false;
Index:
src/org/eclipse/cdt/internal/parser/generated/CPPParserTokenManager.java
===================================================================
RCS file:
/home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/parser/generat
ed/CPPParserTokenManager.java,v
retrieving revision 1.1
diff -u -r1.1 CPPParserTokenManager.java
--- src/org/eclipse/cdt/internal/parser/generated/CPPParserTokenManager.java
26 Jun 2002 20:39:58 -0000	1.1
+++ src/org/eclipse/cdt/internal/parser/generated/CPPParserTokenManager.java
10 Feb 2003 23:24:09 -0000
@@ -1,7 +1,6 @@
 /* Generated By:JavaCC: Do not edit this line. CPPParserTokenManager.java
*/
 package org.eclipse.cdt.internal.parser.generated;
 
-import org.eclipse.cdt.internal.parser.ParserCallback;
 // redirect to a fixed class
 import org.eclipse.cdt.internal.parser.ASCII_CharStream;
 
@@ -55,12 +54,11 @@
 };
 static private final int jjMoveNfa_1(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 5;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -116,7 +114,6 @@
       }
       else if (curChar < 128)
       {
-         long l = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -169,12 +166,11 @@
 }
 static private final int jjMoveNfa_3(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 1;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -198,7 +194,6 @@
       }
       else if (curChar < 128)
       {
-         long l = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -209,8 +204,6 @@
       }
       else
       {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -238,12 +231,11 @@
 }
 static private final int jjMoveNfa_4(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 3;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -278,7 +270,6 @@
       }
       else if (curChar < 128)
       {
-         long l = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -289,8 +280,6 @@
       }
       else
       {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -318,12 +307,11 @@
 }
 static private final int jjMoveNfa_2(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 5;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -379,7 +367,6 @@
       }
       else if (curChar < 128)
       {
-         long l = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -432,12 +419,11 @@
 }
 static private final int jjMoveNfa_6(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 3;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -472,7 +458,6 @@
       }
       else if (curChar < 128)
       {
-         long l = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -483,8 +468,6 @@
       }
       else
       {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -1256,12 +1239,11 @@
 }
 static private final int jjMoveNfa_0(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 109;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -1946,12 +1928,11 @@
 }
 static private final int jjMoveNfa_8(int startState, int curPos)
 {
-   int[] nextStates;
    int startsAt = 0;
    jjnewStateCnt = 3;
    int i = 1;
    jjstateSet[0] = startState;
-   int j, kind = 0x7fffffff;
+   int kind = 0x7fffffff;
    for (;;)
    {
       if (++jjround == 0x7fffffff)
@@ -1986,7 +1967,6 @@
       }
       else if (curChar < 128)
       {
-         long l = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -1997,8 +1977,6 @@
       }
       else
       {
-         int i2 = (curChar & 0xff) >> 6;
-         long l2 = 1L << (curChar & 077);
          MatchLoop: do
          {
             switch(jjstateSet[--i])
@@ -2152,8 +2130,6 @@
 
 public static final Token getNextToken() 
 {
-  int kind;
-  Token specialToken = null;
   Token matchedToken;
   int curPos = 0;
 
_______________________________________________
cdt-patch mailing list
cdt-patch@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/cdt-patch