Page MenuHomeFreeBSD

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

Authored by arybchik on Nov 21 2018, 11:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Feb 4, 8:39 AM
Unknown Object (File)
Sun, Jan 19, 8:55 PM
Unknown Object (File)
Oct 1 2024, 3:55 AM
Unknown Object (File)
Sep 8 2024, 1:10 AM
Unknown Object (File)
Sep 7 2024, 8:15 PM
Unknown Object (File)
Sep 7 2024, 5:45 AM
Unknown Object (File)
Sep 4 2024, 10:35 PM
Unknown Object (File)
Aug 24 2024, 10:07 PM
Subscribers

Details

Summary

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.

Test Plan

amd64 tinderbox kernel builds tested
driver loaded/unloaded, interfaces up/down, traffic works fine

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2018, 6:44 AM
This revision was automatically updated to reflect the committed changes.