From: Martin Wilck <mwilck@xxxxxxxx> This fixes the following error emitted by clang 13: weightedpath.c:67:8: error: variable 'arg' set but not used [-Werror,-Wunused-but-set-variable] char *arg __attribute__((cleanup(cleanup_charp))) = NULL; Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmultipath/prioritizers/weightedpath.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libmultipath/prioritizers/weightedpath.c b/libmultipath/prioritizers/weightedpath.c index 6f20e8f..561ebb4 100644 --- a/libmultipath/prioritizers/weightedpath.c +++ b/libmultipath/prioritizers/weightedpath.c @@ -74,7 +74,8 @@ int prio_path_weight(struct path *pp, char *prio_args) if (!prio_args) return priority; - arg = temp = strdup(prio_args); + arg = strdup(prio_args); + temp = arg; regex = get_next_string(&temp, split_char); -- 2.33.1 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://listman.redhat.com/mailman/listinfo/dm-devel