mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
everywhere: misc unnecessary var init/update
These are all cases where we initialise or update a variable, and then never use it. None of them particularly matter, as the compiler should optimise them all away during dead store elimination, but some static analysers complain about them and they are extra work for casual readers to follow, so worth removing. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Rob Norris <robn@despairlabs.com> Sponsored-by: https://despairlabs.com/sponsor/ Closes #17551
This commit is contained in:
committed by
Brian Behlendorf
parent
d2b9e66b88
commit
bf38c15071
@@ -301,7 +301,7 @@ static int
|
||||
write_idmap(pid_t pid, char *buf, size_t buf_size, idmap_type_t type)
|
||||
{
|
||||
char path[PATH_MAX];
|
||||
int fd = -EBADF;
|
||||
int fd;
|
||||
int ret;
|
||||
|
||||
(void) snprintf(path, sizeof (path), "/proc/%d/%cid_map",
|
||||
|
||||
@@ -152,7 +152,7 @@ getfdname(char *pdir, char type, int level, int dir, int file)
|
||||
static void
|
||||
crtfile(char *pname)
|
||||
{
|
||||
int fd = -1;
|
||||
int fd;
|
||||
int i, size;
|
||||
const char *context = "0123456789ABCDF";
|
||||
char *pbuf;
|
||||
|
||||
@@ -59,7 +59,7 @@ static void *
|
||||
normal_writer(void *filename)
|
||||
{
|
||||
char *file_path = filename;
|
||||
int fd = -1;
|
||||
int fd;
|
||||
ssize_t write_num = 0;
|
||||
int page_size = getpagesize();
|
||||
|
||||
@@ -93,7 +93,7 @@ normal_writer(void *filename)
|
||||
static void *
|
||||
map_writer(void *filename)
|
||||
{
|
||||
int fd = -1;
|
||||
int fd;
|
||||
int ret = 0;
|
||||
char *buf = NULL;
|
||||
int page_size = getpagesize();
|
||||
|
||||
Reference in New Issue
Block a user