libzfs_sendrecv: zfs_send: remove unused pipefd and tid variables
fixup of 196bee4
On gcc (GCC) 9.2.1 20190827 (Red Hat 9.2.1-1), the code removed
caused `-Wmaybe-uninitialized` errors.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Christian Schwarz <me@cschwarz.com>
Closes #11021
This commit is contained in:
parent
73989f4b9e
commit
36482bf607
|
@ -2119,8 +2119,6 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
|
||||||
avl_tree_t *fsavl = NULL;
|
avl_tree_t *fsavl = NULL;
|
||||||
static uint64_t holdseq;
|
static uint64_t holdseq;
|
||||||
int spa_version;
|
int spa_version;
|
||||||
pthread_t tid = 0;
|
|
||||||
int pipefd[2];
|
|
||||||
int featureflags = 0;
|
int featureflags = 0;
|
||||||
FILE *fout;
|
FILE *fout;
|
||||||
|
|
||||||
|
@ -2172,10 +2170,7 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
|
||||||
/* dump each stream */
|
/* dump each stream */
|
||||||
sdd.fromsnap = fromsnap;
|
sdd.fromsnap = fromsnap;
|
||||||
sdd.tosnap = tosnap;
|
sdd.tosnap = tosnap;
|
||||||
if (tid != 0)
|
sdd.outfd = outfd;
|
||||||
sdd.outfd = pipefd[0];
|
|
||||||
else
|
|
||||||
sdd.outfd = outfd;
|
|
||||||
sdd.replicate = flags->replicate;
|
sdd.replicate = flags->replicate;
|
||||||
sdd.doall = flags->doall;
|
sdd.doall = flags->doall;
|
||||||
sdd.fromorigin = flags->fromorigin;
|
sdd.fromorigin = flags->fromorigin;
|
||||||
|
@ -2278,13 +2273,6 @@ zfs_send(zfs_handle_t *zhp, const char *fromsnap, const char *tosnap,
|
||||||
if (err == 0 && !sdd.seento)
|
if (err == 0 && !sdd.seento)
|
||||||
err = ENOENT;
|
err = ENOENT;
|
||||||
|
|
||||||
if (tid != 0) {
|
|
||||||
if (err != 0)
|
|
||||||
(void) pthread_cancel(tid);
|
|
||||||
(void) close(pipefd[0]);
|
|
||||||
(void) pthread_join(tid, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sdd.cleanup_fd != -1) {
|
if (sdd.cleanup_fd != -1) {
|
||||||
VERIFY(0 == close(sdd.cleanup_fd));
|
VERIFY(0 == close(sdd.cleanup_fd));
|
||||||
sdd.cleanup_fd = -1;
|
sdd.cleanup_fd = -1;
|
||||||
|
@ -2313,11 +2301,6 @@ err_out:
|
||||||
|
|
||||||
if (sdd.cleanup_fd != -1)
|
if (sdd.cleanup_fd != -1)
|
||||||
VERIFY(0 == close(sdd.cleanup_fd));
|
VERIFY(0 == close(sdd.cleanup_fd));
|
||||||
if (tid != 0) {
|
|
||||||
(void) pthread_cancel(tid);
|
|
||||||
(void) close(pipefd[0]);
|
|
||||||
(void) pthread_join(tid, NULL);
|
|
||||||
}
|
|
||||||
return (err);
|
return (err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue