Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@vmware.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	 "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFA] breakpoint.c, create_breakpoint, document that the case statement falls through.
Date: Fri, 04 Mar 2011 18:58:00 -0000	[thread overview]
Message-ID: <4D71365A.4040404@vmware.com> (raw)
In-Reply-To: <m3lj0wxfn2.fsf@fleche.redhat.com>

[-- Attachment #1: Type: text/plain, Size: 513 bytes --]

Tom Tromey wrote:
>>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:
> 
> Michael> No, honest, it *does* fall through!
> Michael> I had to use a printf statement to convince myself.   ;-)
> Michael> When the user answers "yes" to the query, it falls through.
> 
> Yeah.  Your patch is correct, or at least correct-enough.
> Adding a "break" would also be correct, because sals.nelts is never 0 at
> the end of this case.
> 
> Tom

OK then, I'd rather break than fall through.
Committed as attached.


[-- Attachment #2: break10.txt --]
[-- Type: text/plain, Size: 570 bytes --]

2011-03-04  Michael Snyder  <msnyder@vmware.com>

	* breakpoint.c (create_breakpoint): Add missing break statement.

Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.546
diff -u -p -u -p -r1.546 breakpoint.c
--- breakpoint.c	1 Mar 2011 02:16:56 -0000	1.546
+++ breakpoint.c	4 Mar 2011 18:57:27 -0000
@@ -7843,6 +7843,7 @@ create_breakpoint (struct gdbarch *gdbar
 	default:
 	  throw_exception (e);
 	}
+      break;
     default:
       if (!sals.nelts)
 	return 0;

      reply	other threads:[~2011-03-04 18:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-03  0:42 Michael Snyder
2011-03-03  4:27 ` Joel Brobecker
2011-03-03  9:55   ` Pedro Alves
2011-03-03 17:11   ` Michael Snyder
2011-03-03 17:45     ` Tom Tromey
2011-03-04 18:58       ` Michael Snyder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D71365A.4040404@vmware.com \
    --to=msnyder@vmware.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox