public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/17395] New: util.cxx:1120: bad switch statement ?
@ 2014-09-15 19:21 dcb314 at hotmail dot com
  2014-09-15 19:37 ` [Bug runtime/17395] " jistone at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: dcb314 at hotmail dot com @ 2014-09-15 19:21 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 17395
           Summary: util.cxx:1120: bad switch statement ?
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: dcb314 at hotmail dot com

[util.cxx:1120] -> [util.cxx:1122]: (warning) Variable 'err_msg' is reassigned
a value before the old one has been used. 'break;' missing?

      switch (errno) // ignore EINVAL: invalid signal
      {
        case ESRCH:
          err_msg = "pid given does not correspond to a running process";
        case EPERM:
          err_msg = "invalid permissions for signalling given pid";
        default:
          err_msg = "invalid pid";
      }

Basic coding error. Suggest add break statements.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug runtime/17395] util.cxx:1120: bad switch statement ?
  2014-09-15 19:21 [Bug runtime/17395] New: util.cxx:1120: bad switch statement ? dcb314 at hotmail dot com
@ 2014-09-15 19:37 ` jistone at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: jistone at redhat dot com @ 2014-09-15 19:37 UTC (permalink / raw)
  To: systemtap

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

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jistone at redhat dot com
         Resolution|---                         |FIXED

--- Comment #1 from Josh Stone <jistone at redhat dot com> ---
You're absolutely right.  I believe this was factored out of code that used to
directly throw exceptions from those strings, which is why it didn't need a
break.  But it sure does now.

commit 07a687a0c357137cf05c6350bffc94f7161a93a7

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-15 19:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-15 19:21 [Bug runtime/17395] New: util.cxx:1120: bad switch statement ? dcb314 at hotmail dot com
2014-09-15 19:37 ` [Bug runtime/17395] " jistone at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).