fmt/test
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
..
add-subdirectory-test Bump tested CMake version to 3.18 2020-07-19 08:50:34 -07:00
compile-error-test Bump tested CMake version to 3.18 2020-07-19 08:50:34 -07:00
cuda-test
find-package-test Bump tested CMake version to 3.18 2020-07-19 08:50:34 -07:00
fuzzing Fuzz fallback formatter 2020-11-03 19:34:35 -08:00
gmock
gtest
assert-test.cc Explain why assert-test is a separate test 2020-10-11 10:13:42 -07:00
chrono-test.cc 🎨 🐛 Rename all shadowed types and variables 2020-11-03 07:30:27 -08:00
CMakeLists.txt Remove old test 2020-10-11 10:13:42 -07:00
color-test.cc Fix coding conventions 2020-09-06 09:26:32 -07:00
compile-test.cc Cleanup 2020-10-11 10:13:42 -07:00
core-test.cc Optimize includes 2020-11-09 16:34:54 -08:00
format Reduce symbol sizes and simplify iterator use 2020-07-09 08:51:43 -07:00
format-impl-test.cc Make GetCachedPower test more precise 2020-10-04 08:00:47 -07:00
format-test.cc 🔧 Silence useless cast warnings (#2008) 2020-11-11 07:56:59 -08:00
gmock-gtest-all.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
gtest-extra-test.cc Fix build failure when not using fcntl with -Werror (#1990) 2020-11-06 15:39:59 -08:00
gtest-extra.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
gtest-extra.h Add color format_to overloads 2020-09-06 08:24:15 -07:00
header-only-test2.cc
header-only-test.cc
locale-test.cc 🎨 🐛 Rename all shadowed types and variables 2020-11-03 07:30:27 -08:00
mock-allocator.h Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
os-test.cc Fix move constructor (#1844) 2020-09-01 08:48:56 -07:00
ostream-test.cc 🎨 🐛 Rename all shadowed types and variables 2020-11-03 07:30:27 -08:00
posix-mock-test.cc Fix build failure when not using fcntl with -Werror (#1990) 2020-11-06 15:39:59 -08:00
posix-mock.h Fix posix-mock-test 2020-04-01 08:42:14 -07:00
printf-test.cc fix typo which caused the loss of the counting information when using a printf context with a truncating_iterator 2020-06-05 07:37:54 -07:00
ranges-test.cc Range support 2020-10-28 05:35:37 -07:00
scan-test.cc internal -> detail (#1538) 2020-05-10 07:34:30 -07:00
scan.h Optimize format string parsing 2020-06-06 08:15:33 -07:00
std-format-test.cc Fix implicit signedness conversion warning (#1963) 2020-10-29 06:26:18 -07:00
test-assert.h Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
test-main.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
util.cc Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00
util.h Consistently namespace qualify size_t 2020-05-07 15:59:46 -07:00