From 78dcc924cd0fedc1e9810fdfc08e6afdb1315057 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 14 Sep 2020 17:23:55 +0300 Subject: fix GCC builds --- test/test_lib.cpp | 6 +++--- test/unit_tests/fixtures.hpp | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/test_lib.cpp b/test/test_lib.cpp index 6775850..ee02ffb 100644 --- a/test/test_lib.cpp +++ b/test/test_lib.cpp @@ -32,17 +32,17 @@ void do_throw_call_stack() { volatile int var = 42; void baz(F f) { - boost::nowide::cout << "baz " << pdb::format_address(&baz) << '\n'; + boost::nowide::cout << "baz " << pdb::format_address(reinterpret_cast(&baz)) << '\n'; f(); } void bar(F f) { - boost::nowide::cout << "bar " << pdb::format_address(&bar) << '\n'; + boost::nowide::cout << "bar " << pdb::format_address(reinterpret_cast(&bar)) << '\n'; baz(f); } void foo(F f) { - boost::nowide::cout << "foo " << pdb::format_address(&foo) << '\n'; + boost::nowide::cout << "foo " << pdb::format_address(reinterpret_cast(&foo)) << '\n'; bar(f); } diff --git a/test/unit_tests/fixtures.hpp b/test/unit_tests/fixtures.hpp index 7572e0e..85451d4 100644 --- a/test/unit_tests/fixtures.hpp +++ b/test/unit_tests/fixtures.hpp @@ -49,7 +49,9 @@ public: typedef Set AddressList; static AddressList expected_function_addresses() { - return cast({&test_ns::foo, &test_ns::bar, &test_ns::baz}); + return cast({reinterpret_cast(&test_ns::foo), + reinterpret_cast(&test_ns::bar), + reinterpret_cast(&test_ns::baz)}); } static SymbolList expected_functions() { return make_qualified({"foo", "bar", "baz"}); } -- cgit v1.2.3