timespecaddto.c: Use of 32-bit time_t
Summary
Coverity CID 1512527
Coverity spotted this where time_t variables/structure elements are assigned to uint32_t. Notice that the return type is uint32_t which propagates to callers of this such as rtems_timespec_add_to().
46 uint32_t _Timespec_Add_to(
47 struct timespec *time,
48 const struct timespec *add
49)
50{
CID 1512527: (#1 of 1): Use of 32-bit time_t (Y2K38_SAFETY)
1. store_truncates_time_t: A time_t value is stored in an integer with too few bits to accommodate it. The expression add->tv_sec is cast to uint32_t.
51 uint32_t seconds = add->tv_sec;