This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/13355] New: elf32-rx.c: 2 * bad comparison


http://sourceware.org/bugzilla/show_bug.cgi?id=13355

             Bug #: 13355
           Summary: elf32-rx.c: 2 *  bad comparison
           Product: gdb
           Version: 7.3
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: dcb314@hotmail.com
    Classification: Unclassified


I just ran the static analysis tool, cppcheck, over the source code 
of gdb-7.3.50.20110722. It said

1.

[gdb-7.3.50.20110722/bfd/elf32-rx.c:2053]: (style) Mismatching comparison, the
result is always true]

The source code is

          && (insn[0] & 0x30) != 3

Perhaps

          && (insn[0] & 0x30) != 0x30

was intended.

2.

[gdb-7.3.50.20110722/bfd/elf32-rx.c:2157]: (style) Mismatching comparison, the
result is always true]

Duplicate.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]