bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/16021] New: binutils-2.23.2/bfd/elf32-rl78.c:1110: bad swi


From: dcb314 at hotmail dot com
Subject: [Bug binutils/16021] New: binutils-2.23.2/bfd/elf32-rl78.c:1110: bad switch statement
Date: Wed, 09 Oct 2013 09:42:50 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=16021

            Bug ID: 16021
           Summary: binutils-2.23.2/bfd/elf32-rl78.c:1110: bad switch
                    statement
           Product: binutils
           Version: 2.23
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: dcb314 at hotmail dot com

I just ran the static analysis tool "cppcheck" over the
source code of binutils-2.23.2

It said

[binutils-2.23.2/bfd/elf32-rl78.c:1110] ->
[binutils-2.23.2/bfd/elf32-rl78.c:1111]: (warning) Variable 'st_info_str' is
reassigned a value before the old one has been used. 'break;' missing?

Source code is

      switch (ELF_ST_TYPE (isym->st_info))
    {
    case STT_FUNC: st_info_str = "STT_FUNC";
    case STT_SECTION: st_info_str = "STT_SECTION";
    case STT_FILE: st_info_str = "STT_FILE";
    case STT_OBJECT: st_info_str = "STT_OBJECT";
    case STT_TLS: st_info_str = "STT_TLS";
    default: st_info_str = "";
    }

Basic coding error. Suggest add break statements.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]