Skip to contentSkip to conversation

libsupport: remove unused label in get_devname()

PATCH In review Eric Biggers 2 participants 2 messages Jan 4, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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:

      | ^~~~~~~~~~
---
 lib/support/devname.c | 1 -
 1 file changed, 1 deletion(-)
lib/support/devname.c +0 -1
index 8c2349a3..e0306ddf 100644
@@ -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:
Signature · 1 line
2.39.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Eric Biggers

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!

Quoted 22 lines
---
 lib/support/devname.c | 1 -
 1 file changed, 1 deletion(-)
lib/support/devname.c +0 -1
index 8c2349a3..e0306ddf 100644
@@ -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:
Signature · 1 line
2.39.0