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

Details

Provenance
dimAuthored on Jul 27 2022, 7:00 PM
Parents
rG50526f522bc4: bhyve: fix spelling mistake in passthru emulation
Branches
Unknown
Tags
Unknown