HomeFreeBSD

MFC r305360:

Description

MFC r305360:

With clang 3.9.0, compiling cxgb results in the following warning:

sys/dev/cxgb/cxgb_sge.c:2873:44: error: implicit conversion from 'int'
to 'char' changes value from 128 to -128 [-Werror,-Wconstant-conversion]

*mtod(m, char *) = CPL_ASYNC_NOTIF;
                 ~ ^~~~~~~~~~~~~~~

This is because CPL_ASYNC_NOTIF is 0x80, so the plain char argument is
wrapped to a negative value. Fix this by using uint8_t instead.

Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D7772

Details

Provenance
dimAuthored on
Reviewer
np
Differential Revision
D7772: Fix constant conversion warning in cxgb(4)
Parents
rS305555: MFC r305345:
Branches
Unknown
Tags
Unknown