From: "Anthony PERARD" <anthony.perard@vates.tech>
To: "Ariel Otilibili" <Ariel.Otilibili-Anieli@eurecom.fr>
Cc: xen-devel@lists.xenproject.org, "Juergen Gross" <jgross@suse.com>,
"Daniel P. Smith" <dpsmith@apertussolutions.com>
Subject: Re: [PATCH v2 1/2] tools/libs: remove dead code
Date: Wed, 08 Jan 2025 10:15:10 +0000 [thread overview]
Message-ID: <Z35QLcQAnbUqRBIm@l14> (raw)
In-Reply-To: <20241224191529.138119-2-Ariel.Otilibili-Anieli@eurecom.fr>
Hi Ariel,
On Tue, Dec 24, 2024 at 08:13:54PM +0100, Ariel Otilibili wrote:
> Default switch cases skip these steps; these instructions are never reached.
The "default" case might skip these statements, but the intention behind
those statements is to make sure that every other cases also skip these,
with "return" or "goto".
There's a comment on each of those statements, so it should be clear
enough that those are not expected to be executed. So I'd rather keep
those two statements.
But thanks.
> Coverity-IDs: 1056148, 1056149
> Fixes: 0a69ea908d ("libxl: ao: convert libxl__spawn_*")
> Fixes: 643b106b40 ("libxl: do not use tap disk backend other than for raw and vhd")
> Signed-off-by: Ariel Otilibili <Ariel.Otilibili-Anieli@eurecom.fr>
> ---
> diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c
> index e03599ea99..d0271bef7e 100644
> --- a/tools/libs/light/libxl_create.c
> +++ b/tools/libs/light/libxl_create.c
> @@ -1890,7 +1890,6 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev,
> ret = ERROR_INVAL;
> goto error_out;
> }
> - abort(); /* not reached */
>
> error_out:
> assert(ret);
> diff --git a/tools/libs/light/libxl_device.c b/tools/libs/light/libxl_device.c
> index 4faa5fa3bd..96046803e1 100644
> --- a/tools/libs/light/libxl_device.c
> +++ b/tools/libs/light/libxl_device.c
> @@ -392,7 +392,6 @@ static int disk_try_backend(disk_try_backend_args *a,
> return 0;
>
> }
> - abort(); /* notreached */
>
> bad_format:
> LOG(DEBUG, "Disk vdev=%s, backend %s unsuitable due to format %s",
Cheers,
--
Anthony Perard | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
next prev parent reply other threads:[~2025-01-08 10:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-20 16:55 [PATCH 0/2] tools/libs,xen/tools: remove dead code Ariel Otilibili
2024-12-20 16:55 ` [PATCH 1/2] tools/libs: " Ariel Otilibili
2024-12-20 16:55 ` [PATCH 2/2] xen/tools: " Ariel Otilibili
2024-12-24 8:43 ` Jan Beulich
2024-12-24 14:51 ` Ariel Otilibili-Anieli
2024-12-24 19:13 ` [PATCH v2 0/2] tools/libs,xen/tools: " Ariel Otilibili
2024-12-24 19:13 ` [PATCH v2 1/2] tools/libs: " Ariel Otilibili
2025-01-08 10:15 ` Anthony PERARD [this message]
2024-12-24 19:13 ` [PATCH v2 2/2] xen/tools: " Ariel Otilibili
2024-12-27 9:30 ` Jan Beulich
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=Z35QLcQAnbUqRBIm@l14 \
--to=anthony.perard@vates.tech \
--cc=Ariel.Otilibili-Anieli@eurecom.fr \
--cc=dpsmith@apertussolutions.com \
--cc=jgross@suse.com \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.