HomeFreeBSD

Fix clang 15 warning in cxgbe

Description

Fix clang 15 warning in cxgbe

Clang 15 warns:

sys/dev/cxgbe/cudbg/cudbg_lib.c:2949:6: error: variable 'i' set but not used [-Werror,-Wunused-but-set-variable]
        int i = 0;
            ^

Apparently 'i' was meant as the current retry counter, but '1' was used
in the while loop comparison instead, making the loop potentially
infinite, if 'busy' never gets reset.

MFC after: 3 days
Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D35834

(cherry picked from commit fb0493d55998eeb9f062b15b40924ff722f3eba5)

Details

Provenance
dimAuthored on Jul 16 2022, 7:19 PM
Reviewer
np
Differential Revision
D35834: Fix clang 15 warning in cxgbe
Parents
rGdc2e12abb22a: Unlock inp when handling TCP_MD5SIG socket options
Branches
Unknown
Tags
Unknown