HomeFreeBSD

Fix unused variable warning in mlx5_ib_devx.c

Description

Fix unused variable warning in mlx5_ib_devx.c

With clang 15, the following -Werror warning is produced:

sys/dev/mthca/mthca_cmd.c:662:23: error: variable 'tc' set but not used [-Werror,-Wunused-but-set-variable]
        int ts __unused = 0, tc = 0;
                             ^

The 'ts' and 'tc' variables are eventually used only in mthca_dbg()
macros, if CONFIG_INFINIBAND_MTHCA_DEBUG is defined. Ensure 'ts' and
'tc' are only declared and used when CONFIG_INFINIBAND_MTHCA_DEBUG is
defined.

MFC after: 3 days

Details

Provenance
dimAuthored on Jul 24 2022, 10:22 PM
Parents
rG3a0b2432828e: Fix unused variable warning in mlx5_ib_devx.c
Branches
Unknown
Tags
Unknown