Page MenuHomeFreeBSD

Fix compile warning in if_fxp(4).
ClosedPublic

Authored by markj on Dec 18 2018, 8:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 22, 7:19 AM
Unknown Object (File)
Mon, Apr 8, 9:07 PM
Unknown Object (File)
Mar 8 2024, 6:21 PM
Unknown Object (File)
Feb 29 2024, 1:09 AM
Unknown Object (File)
Feb 24 2024, 3:10 AM
Unknown Object (File)
Feb 24 2024, 3:10 AM
Unknown Object (File)
Feb 24 2024, 3:10 AM
Unknown Object (File)
Feb 23 2024, 12:50 PM
Subscribers
None

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
Lint Not Applicable
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...