HomeFreeBSD

nvmecontrol: Fix a sign compare mismatch

Description

nvmecontrol: Fix a sign compare mismatch

Even though mqes (uint16_t) and queue_size (u_int) are both unsigned,
the expression 'mqes + 1' gets promoted to int which is signed. Keep
the value unsigned by explicitly promoting mqes to u_int before
incrementing the value.

Reported by: GCC

Details

Provenance
jhbAuthored on May 7 2024, 8:45 PM
Parents
rG766c4ad385cc: libzpool: Disable -Wpointer-to-int-cast warnings for GCC
Branches
Unknown
Tags
Unknown