Jonathan Gopel 1b8f499ee1
🔧 Silence useless cast warnings (#2008)
Problem:
- gcc-10 is generating the following warning at all standards:

    test/format-test.cc: In member function 'virtual void UtilTest_BitCast_Test::TestBody()':
    test/format-test.cc:108:42: error: useless cast to type 'uint64_t' {aka 'long long unsigned int'} [-Werror=useless-cast]
      108 |   s = fmt::detail::bit_cast<uint32_pair>(uint64_t(~0ull));
          |                                          ^~~~~~~~~~~~~~~
- gcc-8 is generating the following warning at all standards:
    test/format-test.cc: In member function 'virtual void UtilTest_BitCast_Test::TestBody()':
    test/format-test.cc:108:56: error: useless cast to type 'uint64_t' {aka 'long long unsigned int'} [-Werror=useless-cast]
       s = fmt::detail::bit_cast<uint32_pair>(uint64_t(~0ull));
                                                        ^
Solution:
- Cast 0 to a 64 unsigned bit int and then invert.

Co-authored-by: Jonathan Gopel <jgopel@quantlab.com>
2020-11-11 07:56:59 -08:00
..
2020-11-03 19:34:35 -08:00
2017-03-09 06:09:43 -08:00
2020-11-03 07:30:27 -08:00
2020-10-11 10:13:42 -07:00
2020-09-06 09:26:32 -07:00
2020-10-11 10:13:42 -07:00
2020-11-09 16:34:54 -08:00
2020-09-06 08:24:15 -07:00
2020-11-03 07:30:27 -08:00
2020-09-01 08:48:56 -07:00
2020-11-03 07:30:27 -08:00
2020-04-01 08:42:14 -07:00
2020-10-28 05:35:37 -07:00
2020-05-10 07:34:30 -07:00
2020-06-06 08:15:33 -07:00
2020-05-07 15:59:46 -07:00
2020-05-07 15:59:46 -07:00