Page MenuHomeFreeBSD

Fix compile warning in if_fxp(4).
ClosedPublic

Authored by markj on Dec 18 2018, 8:50 PM.

Details

Summary

clang 7 warns about the negative array index. Try to implement the same
logic without invoking undefined behaviour.

Test Plan

There is no difference in the disassembly before and after this change.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

markj added reviewers: imp, brooks, dim.

This matches what I puzzled out the right fix should be, and is a bit better than what I had in mind before this problem slipped away...

This revision is now accepted and ready to land.Dec 19 2018, 3:52 AM
This revision was automatically updated to reflect the committed changes.

Thanks for chasing this down. This was quite the abomination...