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

Re: [Xen-devel] [PATCH] tools/libxl: Drop dead code following calls to libxl__exec()



On Thu, 2015-11-19 at 12:43 +0000, Andrew Cooper wrote:
> libxl__exec() doesn't ever return.ÂÂInform the compiler of this, and
> remove all dead code.
> 
> No functional change.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked + applied, thanks.

> ---
> CC: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
> CC: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Âtools/libxl/libxl.cÂÂÂÂÂÂÂÂÂÂÂÂ| 1 -
> Âtools/libxl/libxl_aoutils.cÂÂÂÂ| 2 --
> Âtools/libxl/libxl_bootloader.c | 1 -
> Âtools/libxl/libxl_internal.hÂÂÂ| 2 +-
> Â4 files changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 854e957..6ad9e13 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -1983,7 +1983,6 @@ int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t
> domid, int autopass)
> ÂÂÂÂÂ}
> Â
> ÂÂÂÂÂlibxl__exec(gc, autopass_fd, -1, -1, args[0], args, NULL);
> -ÂÂÂÂabort();
> Â
> Â x_fail:
> ÂÂÂÂÂGC_FREE;
> diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c
> index d5fbc4d..9e493cd 100644
> --- a/tools/libxl/libxl_aoutils.c
> +++ b/tools/libxl/libxl_aoutils.c
> @@ -603,8 +603,6 @@ int libxl__async_exec_start(libxl__async_exec_state
> *aes)
> ÂÂÂÂÂÂÂÂÂ/* child */
> ÂÂÂÂÂÂÂÂÂlibxl__exec(gc, aes->stdfds[0], aes->stdfds[1],
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂaes->stdfds[2], args[0], args, aes->env);
> -ÂÂÂÂÂÂÂÂ/* notreached */
> -ÂÂÂÂÂÂÂÂabort();
> ÂÂÂÂÂ}
> Â
> ÂÂÂÂÂreturn 0;
> diff --git a/tools/libxl/libxl_bootloader.c
> b/tools/libxl/libxl_bootloader.c
> index 95dde98..9caf212 100644
> --- a/tools/libxl/libxl_bootloader.c
> +++ b/tools/libxl/libxl_bootloader.c
> @@ -556,7 +556,6 @@ static void bootloader_gotptys(libxl__egc *egc,
> libxl__openpty_state *op)
> ÂÂÂÂÂÂÂÂÂr = login_tty(libxl__carefd_fd(bl->ptys[0].slave));
> ÂÂÂÂÂÂÂÂÂif (r) { LOGE(ERROR, "login_tty failed"); exit(-1); }
> ÂÂÂÂÂÂÂÂÂlibxl__exec(gc, -1, -1, -1, bl->args[0], (char **) bl->args,
> env);
> -ÂÂÂÂÂÂÂÂexit(-1);
> ÂÂÂÂÂ}
> Â
> ÂÂÂÂÂ/* parent */
> diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h
> index 590870a..58d07cd 100644
> --- a/tools/libxl/libxl_internal.h
> +++ b/tools/libxl/libxl_internal.h
> @@ -1578,7 +1578,7 @@ _hidden int
> libxl__xenstore_child_wait_deprecated(libxl__gc *gc,
> Â */
> Â_hiddenÂÂvoid libxl__exec(libxl__gc *gc, int stdinfd, int stdoutfd,
> ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂint stderrfd, const char *arg0, char *const
> args[],
> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂchar *const env[]);
> +ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂchar *const env[]) __attribute__((noreturn));
> Â
> Â/* from xl_create */
> Â
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.