[libvirt] [PATCH] virterror.c: avoid erroneous case "fall-through"

IMHO, this qualifies as an "obvious" fix, but I'll wait for an ACK.
From 0c9eb193ccb0ad507c7dd6dbfe944bb9a0c8ff93 Mon Sep 17 00:00:00 2001 From: Jim Meyering <meyering@redhat.com> Date: Tue, 6 Apr 2010 19:07:14 +0200 Subject: [PATCH] virterror.c: avoid erroneous case "fall-through"
* src/util/virterror.c (virErrorMsg): Insert missing "break;" --- src/util/virterror.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/util/virterror.c b/src/util/virterror.c index d29f95b..96dd1e7 100644 --- a/src/util/virterror.c +++ b/src/util/virterror.c @@ -1,10 +1,10 @@ /* * virterror.c: implements error handling and reporting code for libvirt * - * Copy: Copyright (C) 2006, 2008, 2009 Red Hat, Inc. + * Copy: Copyright (C) 2006, 2008-2010 Red Hat, Inc. * * See COPYING.LIB for the License of this software * * Author: Daniel Veillard <veillard@redhat.com> */ @@ -1147,12 +1147,13 @@ virErrorMsg(virErrorNumber error, const char *info) break; case VIR_ERR_MIGRATE_PERSIST_FAILED: if (info == NULL) errmsg = _("Failed to make domain persistent after migration"); else errmsg = _("Failed to make domain persistent after migration: %s"); + break; case VIR_ERR_HOOK_SCRIPT_FAILED: if (info == NULL) errmsg = _("Hook script execution failed"); else errmsg = _("Hook script execution failed: %s"); break; -- 1.7.0.4.552.gc303

On 04/06/2010 01:09 PM, Jim Meyering wrote:
IMHO, this qualifies as an "obvious" fix, but I'll wait for an ACK.
From 0c9eb193ccb0ad507c7dd6dbfe944bb9a0c8ff93 Mon Sep 17 00:00:00 2001 From: Jim Meyering<meyering@redhat.com> Date: Tue, 6 Apr 2010 19:07:14 +0200 Subject: [PATCH] virterror.c: avoid erroneous case "fall-through"
* src/util/virterror.c (virErrorMsg): Insert missing "break;" --- src/util/virterror.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/util/virterror.c b/src/util/virterror.c index d29f95b..96dd1e7 100644 --- a/src/util/virterror.c +++ b/src/util/virterror.c @@ -1,10 +1,10 @@ /* * virterror.c: implements error handling and reporting code for libvirt * - * Copy: Copyright (C) 2006, 2008, 2009 Red Hat, Inc. + * Copy: Copyright (C) 2006, 2008-2010 Red Hat, Inc. * * See COPYING.LIB for the License of this software * * Author: Daniel Veillard<veillard@redhat.com> */
@@ -1147,12 +1147,13 @@ virErrorMsg(virErrorNumber error, const char *info) break; case VIR_ERR_MIGRATE_PERSIST_FAILED: if (info == NULL) errmsg = _("Failed to make domain persistent after migration"); else errmsg = _("Failed to make domain persistent after migration: %s"); + break; case VIR_ERR_HOOK_SCRIPT_FAILED: if (info == NULL) errmsg = _("Hook script execution failed"); else errmsg = _("Hook script execution failed: %s"); break; -- 1.7.0.4.552.gc303
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
ACK Dave

Dave Allan wrote:
On 04/06/2010 01:09 PM, Jim Meyering wrote:
IMHO, this qualifies as an "obvious" fix, but I'll wait for an ACK.
From 0c9eb193ccb0ad507c7dd6dbfe944bb9a0c8ff93 Mon Sep 17 00:00:00 2001 From: Jim Meyering<meyering@redhat.com> Date: Tue, 6 Apr 2010 19:07:14 +0200 Subject: [PATCH] virterror.c: avoid erroneous case "fall-through"
* src/util/virterror.c (virErrorMsg): Insert missing "break;" --- src/util/virterror.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/util/virterror.c b/src/util/virterror.c index d29f95b..96dd1e7 100644 --- a/src/util/virterror.c +++ b/src/util/virterror.c @@ -1,10 +1,10 @@ /* * virterror.c: implements error handling and reporting code for libvirt * - * Copy: Copyright (C) 2006, 2008, 2009 Red Hat, Inc. + * Copy: Copyright (C) 2006, 2008-2010 Red Hat, Inc. * * See COPYING.LIB for the License of this software * * Author: Daniel Veillard<veillard@redhat.com> */
@@ -1147,12 +1147,13 @@ virErrorMsg(virErrorNumber error, const char *info) break; case VIR_ERR_MIGRATE_PERSIST_FAILED: if (info == NULL) errmsg = _("Failed to make domain persistent after migration"); else errmsg = _("Failed to make domain persistent after migration: %s"); + break; ...
ACK
Thanks for the ACK. However, when I saw the inconsistent spacing above, (the "break" I added is indented one space less than the "else" above it) I worried that my patch had a problem, so I went looking for the cause. There is no problem on my end. This seems to be coming from your mail client: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4 If you can find a way to make it stop doing that, it would be nice. And please let us know, so we can spread the word. I've seen this happening a lot recently. Thunderbird changes white space in ">"-quoted text. Bad T-bird. Bad! This is at least the third time in a week that I've wasted time like this, due to thunderbird.

ACK
Thanks for the ACK. However, when I saw the inconsistent spacing above, (the "break" I added is indented one space less than the "else" above it) I worried that my patch had a problem, so I went looking for the cause. There is no problem on my end. This seems to be coming from your mail client:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Lightning/1.0b2pre Thunderbird/3.0.4
If you can find a way to make it stop doing that, it would be nice. And please let us know, so we can spread the word. I've seen this happening a lot recently. Thunderbird changes white space in ">"-quoted text. Bad T-bird. Bad!
This is at least the third time in a week that I've wasted time like this, due to thunderbird.
If anybody finds out what's going on here, please tell me as I was also scolded by Jim about this repeatedly. Paolo
participants (3)
-
Dave Allan
-
Jim Meyering
-
Paolo Bonzini