I just had a look at some of the source code of the Java package in
the GNU gcc version 4.4.0 snapshot 20081114

gcc-4.4-20081114/libjava/classpath/javax/swing/DefaultListSelectionModel.java:300
Avoid unused local variables such as 'end'.

The source code is

    int beg = sel.nextSetBit(0), end = -1;
    for(int i=beg; i >= 0; i=sel.nextSetBit(i+1))
      end = i;

Suggest remove unused local variable end, since it is in a for loop.
It also looks like the for loop can be removed.


-- 
           Summary: DefaultListSelectionModel.java: remove dead for loop ?
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: libf2c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dcb314 at hotmail dot com
  GCC host triplet: suse-linux-x86_64


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38194

Reply via email to