Page MenuHomeFreeBSD

posixshm_test.c: tautology in test
ClosedPublic

Authored by rlibby on Dec 10 2020, 10:43 PM.
Tags
None
Referenced Files
F101739086: D27564.diff
Sun, Nov 3, 2:05 AM
Unknown Object (File)
Tue, Oct 22, 5:48 AM
Unknown Object (File)
Sun, Oct 20, 7:40 PM
Unknown Object (File)
Sun, Oct 6, 9:03 PM
Unknown Object (File)
Oct 3 2024, 10:05 PM
Unknown Object (File)
Oct 1 2024, 7:25 PM
Unknown Object (File)
Sep 29 2024, 6:35 AM
Unknown Object (File)
Sep 24 2024, 9:54 PM
Subscribers

Details

Summary

gcc -Wtype-limits complained about unsigned >= 0. Cast to signed so
that it might check for underflow.


Alternately, we might just delete the checks.

Test Plan
env MAKEOBJDIRPREFIX=/usr/obj/gcc6 CROSS_TOOLCHAIN=amd64-gcc make buildworld
env MAKEOBJDIRPREFIX=/usr/obj/clang make buildworld

... I'll look into actually running this test too.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 35334
Build 32263: arc lint + arc unit

Event Timeline

The in-kernel source for the sysctl is also unsigned.
I think that the checks can be safely dropped.

In D27564#615982, @kib wrote:

The in-kernel source for the sysctl is also unsigned.
I think that the checks can be safely dropped.

I agree. I can't remember why I added the checks.

feedback: just remove the checks

This revision is now accepted and ready to land.Dec 11 2020, 12:43 AM
This revision was automatically updated to reflect the committed changes.