James McCoy 7ed7af90b6
Fix timespec_object.*_32bit_sec tests on 32-bit platforms
On 32-bit unix platforms, 0xffffffffUL is a 32-bit value so the compiler
complains about converting it to a signed value.

    /home/runner/work/msgpack-c/msgpack-c/test/msgpack_cpp11.cpp:1085:20: error: constant expression evaluates to 4294967295 which cannot be narrowed to type '__time_t' (aka 'long') [-Wc++11-narrowing]
        timespec val1{ 0xffffffffUL, 0 };
                       ^~~~~~~~~~~~
    /home/runner/work/msgpack-c/msgpack-c/test/msgpack_cpp11.cpp:1085:20: note: insert an explicit cast to silence this issue
        timespec val1{ 0xffffffffUL, 0 };
                       ^~~~~~~~~~~~
                       static_cast<__time_t>( )
    /home/runner/work/msgpack-c/msgpack-c/test/msgpack_cpp11.cpp:1085:20: warning: implicit conversion changes signedness: 'unsigned long' to '__time_t' (aka 'long') [-Wsign-conversion]
        timespec val1{ 0xffffffffUL, 0 };
                     ~ ^~~~~~~~~~~~

Since we're trying to test how the maximum 32-bit value that fits in
timespec.tv_sec is handled, directly use the maximum 32-bit value for
the appropriate (un)signed type used for timespec.tv_sec.

We don't just cast to the value, as the compiler suggests, because that
would result in an extremely negative value.
2020-01-05 21:38:45 -05:00
..
2019-12-25 14:39:57 +09:00
2019-12-25 14:39:57 +09:00
2014-06-05 20:49:15 +00:00
2019-12-25 14:39:57 +09:00
2014-06-05 20:49:15 +00:00
2019-12-25 14:24:24 +09:00
2019-12-25 14:39:57 +09:00
2019-12-25 14:39:57 +09:00
2016-05-14 22:05:10 +09:00
2019-12-25 14:39:57 +09:00
2019-12-25 14:39:57 +09:00
2019-12-25 14:39:57 +09:00
2019-12-25 14:59:40 +09:00
2019-12-25 14:39:57 +09:00
2015-11-21 12:41:46 +09:00
2019-12-25 14:39:57 +09:00
2019-12-25 14:39:57 +09:00
2019-12-25 14:39:57 +09:00