2023-01-04 09:08:13

by Eric Biggers

[permalink] [raw]
Subject: [e2fsprogs PATCH] libsupport: remove unused label in get_devname()

From: Eric Biggers <[email protected]>

Address the following compiler warning with gcc -Wall:

devname.c: In function ‘get_devname’:
devname.c:61:1: warning: label ‘out_strdup’ defined but not used [-Wunused-label]
61 | out_strdup:
| ^~~~~~~~~~

Cc: Lukas Czerner <[email protected]>
Signed-off-by: Eric Biggers <[email protected]>
---
lib/support/devname.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/lib/support/devname.c b/lib/support/devname.c
index 8c2349a3..e0306ddf 100644
--- a/lib/support/devname.c
+++ b/lib/support/devname.c
@@ -58,7 +58,6 @@ char *get_devname(blkid_cache cache, const char *token, const char *value)
goto out;
}

-out_strdup:
if (is_file)
ret = strdup(token);
out:
--
2.39.0


2023-01-04 10:36:39

by Lukas Czerner

[permalink] [raw]
Subject: Re: [e2fsprogs PATCH] libsupport: remove unused label in get_devname()

On Wed, Jan 04, 2023 at 01:03:41AM -0800, Eric Biggers wrote:
> From: Eric Biggers <[email protected]>
>
> Address the following compiler warning with gcc -Wall:
>
> devname.c: In function ‘get_devname’:
> devname.c:61:1: warning: label ‘out_strdup’ defined but not used [-Wunused-label]
> 61 | out_strdup:
> | ^~~~~~~~~~

Looks good, thanks!

Reviewed-by: Lukas Czerner <[email protected]>


>
> Cc: Lukas Czerner <[email protected]>
> Signed-off-by: Eric Biggers <[email protected]>
> ---
> lib/support/devname.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/lib/support/devname.c b/lib/support/devname.c
> index 8c2349a3..e0306ddf 100644
> --- a/lib/support/devname.c
> +++ b/lib/support/devname.c
> @@ -58,7 +58,6 @@ char *get_devname(blkid_cache cache, const char *token, const char *value)
> goto out;
> }
>
> -out_strdup:
> if (is_file)
> ret = strdup(token);
> out:
> --
> 2.39.0
>