git: 52642de03bb1 - main - camdd: Remove set but unused variables.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 20 Jun 2023 19:39:12 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=52642de03bb11f0356ff085c01cedc3ac38e7476 commit 52642de03bb11f0356ff085c01cedc3ac38e7476 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2023-06-20 19:32:57 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2023-06-20 19:32:57 +0000 camdd: Remove set but unused variables. Reported by: GCC Reviewed by: ken Differential Revision: https://reviews.freebsd.org/D40655 --- usr.sbin/camdd/camdd.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/usr.sbin/camdd/camdd.c b/usr.sbin/camdd/camdd.c index caf06ba9a596..f6c4baff763c 100644 --- a/usr.sbin/camdd/camdd.c +++ b/usr.sbin/camdd/camdd.c @@ -2748,12 +2748,9 @@ bailout: int camdd_get_next_lba_len(struct camdd_dev *dev, uint64_t *lba, ssize_t *len) { - struct camdd_dev_pass *pass_dev; uint32_t num_blocks; int retval = 0; - pass_dev = &dev->dev_spec.pass; - *lba = dev->next_io_pos_bytes / dev->sector_size; *len = dev->blocksize; num_blocks = *len / dev->sector_size; @@ -2810,15 +2807,11 @@ camdd_queue(struct camdd_dev *dev, struct camdd_buf *read_buf) { struct camdd_buf *buf = NULL; struct camdd_buf_data *data; - struct camdd_dev_pass *pass_dev; size_t new_len; struct camdd_buf_data *rb_data; int is_write = dev->write_dev; int eof_flush_needed = 0; int retval = 0; - int error; - - pass_dev = &dev->dev_spec.pass; /* * If we've gotten EOF or our partner has, we should not continue @@ -2839,7 +2832,7 @@ camdd_queue(struct camdd_dev *dev, struct camdd_buf *read_buf) if (is_write) { read_buf->status = CAMDD_STATUS_EOF; - error = camdd_complete_peer_buf(dev, read_buf); + camdd_complete_peer_buf(dev, read_buf); } goto bailout; } @@ -2908,7 +2901,7 @@ camdd_queue(struct camdd_dev *dev, struct camdd_buf *read_buf) if (len == 0) { dev->flags |= CAMDD_DEV_FLAG_EOF; - error = camdd_complete_peer_buf(dev, read_buf); + camdd_complete_peer_buf(dev, read_buf); goto bailout; } }