xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [PATCH] libxl: compile fix
Date: Wed, 28 Jul 2010 15:03:46 +0200	[thread overview]
Message-ID: <201007281503.46979.Christoph.Egger@amd.com> (raw)
In-Reply-To: <1280319757.24292.122.camel@zakaz.uk.xensource.com>

On Wednesday 28 July 2010 14:22:37 Ian Campbell wrote:
> On Wed, 2010-07-28 at 12:42 +0100, Christoph Egger wrote:
> > Hi!
> >
> > Attached patch fixes this compile error:
> >
> > xl_cmdimpl.c: In function 'create_domain':
> > xl_cmdimpl.c:1099: warning: 'action' may be used uninitialized in this
> > function
>
> Thanks.
>
> This can't actually happen in practice today since the switch statement
> covers all of the possible values of info->shutdown_reason. (in a
> previous version of the series which introduced this code
> shutdown_reason was an enum so the compiler knew this).
>
> However to be robust it is probably worth adding a default: case to the
> switch and logging the unknown shutdown code.
>
> Ian.
>
>
> Subject: xl: log unknown domain shutdown reason and default to destroy
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
>
> diff -r 479d042f25e4 tools/libxl/xl_cmdimpl.c
> --- a/tools/libxl/xl_cmdimpl.c	Wed Jul 28 12:07:44 2010 +0100
> +++ b/tools/libxl/xl_cmdimpl.c	Wed Jul 28 13:21:16 2010 +0100
> @@ -1113,6 +1113,9 @@ static int handle_domain_death(libxl_ctx
>      case SHUTDOWN_watchdog:
>          action = d_config->on_watchdog;
>          break;
> +    default:
> +        LOG("Unknown shutdown reason code %s. Destroying domain.",
> info->shutdown_reason); +        action = ACTION_DESTROY;
>      }
>
>      LOG("Action for shutdown reason code %d is %s", info->shutdown_reason,
> action_on_shutdown_names[action]);
>

Acked-by: Christoph Egger <Christoph.Egger@amd.com>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2010-07-28 13:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 16:31 [PATCH] libxl: blktap2 portiblity fixes Christoph Egger
2010-07-20 16:46 ` Stefano Stabellini
2010-07-21  8:32   ` Christoph Egger
2010-07-23 12:30     ` Stefano Stabellini
2010-07-23 18:05     ` Ian Jackson
2010-07-26 10:56       ` Christoph Egger
2010-07-26 14:53         ` Ian Jackson
2010-07-26 15:00           ` Ian Campbell
2010-07-26 15:12             ` Ian Jackson
2010-07-26 16:01               ` Christoph Egger
2010-07-26 16:05           ` Christoph Egger
2010-07-26 16:36             ` Ian Jackson
2010-07-27 12:07               ` Christoph Egger
2010-07-27 12:15               ` [PATCH 1/6] libxl: " Christoph Egger
2010-07-27 12:16                 ` [PATCH 2/6] " Christoph Egger
2010-07-27 12:17                   ` [PATCH 3/6] " Christoph Egger
2010-07-27 12:18                     ` [PATCH 4/6] " Christoph Egger
2010-07-27 12:20                       ` [PATCH 5/6] " Christoph Egger
2010-07-27 12:21                         ` [PATCH 6/6] " Christoph Egger
2010-07-27 17:00                         ` [PATCH 5/6] " Ian Jackson
2010-07-28  9:17                           ` Christoph Egger
2010-07-27 16:58                       ` [PATCH 4/6] " Ian Jackson
2010-07-28 11:50                         ` Christoph Egger
     [not found]                     ` <19535.3166.214153.676101@mariner.uk.xensource.com>
2010-07-28 11:42                       ` [PATCH] libxl: compile fix Christoph Egger
2010-07-28 12:22                         ` Ian Campbell
2010-07-28 13:03                           ` Christoph Egger [this message]
2010-07-27 16:34                   ` [PATCH 2/6] libxl: portiblity fixes Ian Jackson
2010-07-28  9:06                     ` Christoph Egger
2010-07-28  9:21                       ` Keir Fraser
2010-07-28  9:30                         ` Christoph Egger
2010-07-28 11:39                     ` [PATCH] libxl: move blktap specific code into libxl_blktap.c Christoph Egger
2010-07-29 15:02                       ` Ian Jackson
2010-07-29 15:08                         ` Stefano Stabellini
2010-07-29 15:41                         ` Christoph Egger
2010-07-29 15:46                           ` Ian Jackson
2010-07-29 15:48                           ` Ian Jackson
2010-07-29 16:46                             ` [PATCH] libxl: move blktap-specific " Christoph Egger
2010-07-29 18:02                               ` Ian Jackson
2010-07-30  8:40                                 ` Christoph Egger
2010-07-30  8:45                                   ` Christoph Egger
2010-07-27 16:31                 ` [PATCH 1/6] libxl: portiblity fixes Ian Jackson
2010-07-28  9:49                   ` Christoph Egger
2010-07-27 12:17               ` [PATCH 0/6] " Christoph Egger
2010-07-27 16:30                 ` Ian Jackson

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=201007281503.46979.Christoph.Egger@amd.com \
    --to=christoph.egger@amd.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).