HomeFreeBSD

sys/time: appease gcc -Wtype-limits

Description

sys/time: appease gcc -Wtype-limits

In environments where time_t is 32 bits, including the 32-bit library
build on amd64, the overflow being tested for cannot happen, and gcc
complains with -Wtype-limits, causing the gcc build to fail. Work
around this by ifdef'ing out the saturation code on i386.

Reviewed by: imp, jfree
Discussed with: markj
Fixes: e3799530b3ba ("sys/time: Add saturating sbt conversions")
Differential Revision: https://reviews.freebsd.org/D56369
(cherry picked from commit 00dccc3164c6dff38350a1baeeea7238acf2efc3)

Details

Provenance
rlibbyAuthored on Apr 15 2026, 8:08 AM
jhbCommitted on Apr 24 2026, 3:26 PM
Reviewer
rGe3799530b3ba: sys/time: Add saturating sbt conversions
Differential Revision
D56369: sys/time: appease gcc -Wtype-limits
Parents
rG9c4106c35059: rtld: silence clang's unterminated-string-initialization warning
Branches
Unknown
Tags
Unknown