HomeFreeBSD

Suppress possible unused variable warning for icl_soft.c

Description

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

(cherry picked from commit 02a226ac342f0fb622e654e461c41f4f588f4186)

Details

Provenance
dimAuthored on Jul 27 2022, 7:00 PM
Parents
rG673a6f21da0f: Remove unnecessary terminating slash in iscsi module Makefile
Branches
Unknown
Tags
Unknown