diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-27 19:00:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-27 19:13:58 +0000 |
commit | 02a226ac342f0fb622e654e461c41f4f588f4186 (patch) | |
tree | 326dffeed279118909a06bffbd11e9ada34a9fad /sys/dev/iscsi | |
parent | 50526f522bc4e26e7bd610e376d85bb897c2686c (diff) | |
download | src-02a226ac342f0fb622e654e461c41f4f588f4186.tar.gz src-02a226ac342f0fb622e654e461c41f4f588f4186.zip |
Suppress possible unused variable warning for icl_soft.c
With clang 15, the following -Werror warning is produced on i386:
sys/dev/iscsi//icl_soft.c:1277:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
int i;
^
The 'i' variable is used later in the icl_soft_conn_pdu_get_bio()
function, via the PHYS_TO_DMAP() macro. However, on i386 and some other
architectures, this macro is defined to panic immediately, so in those
cases, 'i' is indeed not used. Suppress the warning by marking 'i' as
unused.
MFC after: 3 days
Diffstat (limited to 'sys/dev/iscsi')
-rw-r--r-- | sys/dev/iscsi/icl_soft.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/iscsi/icl_soft.c b/sys/dev/iscsi/icl_soft.c index 700f1c6e79f8..8a1002e7e4a0 100644 --- a/sys/dev/iscsi/icl_soft.c +++ b/sys/dev/iscsi/icl_soft.c @@ -1274,7 +1274,7 @@ icl_soft_conn_pdu_get_bio(struct icl_conn *ic, struct icl_pdu *ip, { vm_offset_t vaddr; size_t page_offset, todo; - int i; + int i __unused; MPASS(bp->bio_flags & BIO_UNMAPPED); if (bio_off < PAGE_SIZE - bp->bio_ma_offset) { |