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-ani...@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

Reply via email to