Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vboxsf: remove redundant variable out_len

The variable out_len is being used to accumulate the number of
bytes but it is not being used for any other purpose. The variable
is redundant and can be removed.

Cleans up clang scan build warning:
fs/vboxsf/utils.c:443:9: warning: variable 'out_len' set but not
used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20240229225138.351909-1-colin.i.king@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Colin Ian King and committed by
Hans de Goede
0200ceed 4cece764

-3
-3
fs/vboxsf/utils.c
··· 440 440 { 441 441 const char *in; 442 442 char *out; 443 - size_t out_len; 444 443 size_t out_bound_len; 445 444 size_t in_bound_len; 446 445 ··· 447 448 in_bound_len = utf8_len; 448 449 449 450 out = name; 450 - out_len = 0; 451 451 /* Reserve space for terminating 0 */ 452 452 out_bound_len = name_bound_len - 1; 453 453 ··· 467 469 468 470 out += nb; 469 471 out_bound_len -= nb; 470 - out_len += nb; 471 472 } 472 473 473 474 *out = 0;