HomeFreeBSD

sfxge(4): cope with clang warning on negative shift

Description

sfxge(4): cope with clang warning on negative shift

clang 4.0.1-6 on Ubuntu generates false positive warning that shift
is negative. It is done regardless of the fact that the branch is
not taken because of previous check.

The warning is generate in EFX_INSERT_NATIVE32 used by
EFX_INSERT_FIELD_NATIVE32. All similar cases are fixed as well.

It is undesirable to suppress the warning completely.

Sponsored by: Solarflare Communications, Inc.
Differential Revision: https://reviews.freebsd.org/D18229

Details

Provenance
arybchikAuthored on
Differential Revision
D18229: sfxge(4): cope with clang warning on negative shift
Parents
rS341197: sfxge(4): fix comparison always true warning
Branches
Unknown
Tags
Unknown