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)
Wed, Dec 4, 4:44 PM
Unknown Object (File)
Nov 20 2024, 6:33 AM
Unknown Object (File)
Oct 11 2024, 12:38 AM
Unknown Object (File)
Oct 3 2024, 6:14 AM
Unknown Object (File)
Oct 3 2024, 4:49 AM
Unknown Object (File)
Oct 2 2024, 10:37 PM
Unknown Object (File)
Oct 2 2024, 9:23 PM
Unknown Object (File)
Oct 2 2024, 7:47 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...