bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 643 forks source link

Compiler warnings in macOS native build #2567

Open abitmore opened 2 years ago

abitmore commented 2 years ago

Code version: develop branch (https://github.com/bitshares/bitshares-core/commit/ac1cfc058633de8cfd0355fad207e5fa6e9d65f3) OS: macOS 11 (see https://github.com/bitshares/bitshares-core/runs/4621251504) Boost version: 1.69 OpenSSL version: 1.1.1

/Applications/Xcode_13.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libfc.a(non_preemptable_scope_check.cpp.o) has no symbols /Applications/Xcode_13.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libfc.a(non_preemptable_scope_check.cpp.o) has no symbols

This was reported in https://github.com/bitshares/bitshares-core/issues/2340 too, should be fixed by https://github.com/bitshares/bitshares-core/pull/2660:

In file included from /Users/runner/work/bitshares-core/bitshares-core/libraries/chain/database.cpp:30: /Users/runner/work/bitshares-core/bitshares-core/libraries/chain/db_maint.cpp:530:27: warning: lambda capture 'witness_budget' is not used [-Wunused-lambda-capture] modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo] ^~~~ /Users/runner/work/bitshares-core/bitshares-core/libraries/chain/db_maint.cpp:530:43: warning: lambda capture 'worker_budget' is not used [-Wunused-lambda-capture] modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo] ^~~ /Users/runner/work/bitshares-core/bitshares-core/libraries/chain/db_maint.cpp:530:58: warning: lambda capture 'leftover_worker_funds' is not used [-Wunused-lambda-capture] modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo] ^~~~~~~ /Users/runner/work/bitshares-core/bitshares-core/libraries/chain/db_maint.cpp:530:81: warning: lambda capture 'dpo' is not used [-Wunused-lambda-capture] modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo] ^

About boost random generator helper:

In file included from /Users/runner/work/bitshares-core/bitshares-core/tests/cli/main.cpp:63: In file included from /Users/runner/work/bitshares-core/bitshares-core/tests/cli/../common/init_unit_test_suite.hpp:28: In file included from /usr/local/opt/boost@1.69/include/boost/test/included/unit_test.hpp:22: /usr/local/opt/boost@1.69/include/boost/test/impl/framework.ipp:763:30: warning: 'random_shuffle<std::wrap_iter<unsigned long *>, const boost::unit_test::framework::state::random_generator_helper &>' is deprecated [-Wdeprecated-declarations] std::random_shuffle( children_with_the_same_rank.begin(), children_with_the_same_rank.end(), rand_gen ); ^ /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/algorithm:3158:1: note: 'random_shuffle<std::wrap_iter<unsigned long *>, const boost::unit_test::framework::state::random_generator_helper &>' has been explicitly marked deprecated here _LIBCPP_DEPRECATED_IN_CXX14 void ^ /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/__config:1069:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX14' # define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED ^ /Applications/Xcode_13.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/usr/include/c++/v1/config:1052:48: note: expanded from macro '_LIBCPP_DEPRECATED' `# define _LIBCPP_DEPRECATED attribute__ ((deprecated))` ^

It appears when building chain_test and app_test too.