Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.2] fixing compile warnings in cleos main.cpp #626

Merged
merged 2 commits into from
Jul 8, 2022
Merged

Conversation

linh2931
Copy link
Member

@linh2931 linh2931 commented Jul 8, 2022

Resolved #619

Fixed the following warnings. Now cleos main.cpp compiles without any warnings.

.../programs/cleos/main.cpp: In function ‘fc::variant push_transaction(eosio::chain::signed_transaction&, const std::vector<fc::crypto::public_key>&)’:
.../programs/cleos/main.cpp:503:112: warning: ‘static void eosio::chain::abi_serializer::to_variant(const T&, fc::variant&, Resolver, const fc::microseconds&) [with T = eosio::chain::signed_transaction; Resolver = <lambda(const eosio::chain::name&)>]’ is deprecated: use the overload with yield_function_t[=create_yield_function(max_serialization_time)] [-Wdeprecated-declarations]
  503 |             abi_serializer::to_variant(trx, unpacked_data_trx, abi_serializer_resolver, abi_serializer_max_time);
      |                                                                                                                ^
In file included from .../libraries/chain/include/eosio/chain/controller.hpp:9,
                 from .../plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp:7,
                 from .../programs/cleos/main.cpp:83:
.../libraries/chain/include/eosio/chain/abi_serializer.hpp:947:6: note: declared here
  947 | void abi_serializer::to_variant( const T& o, fc::variant& vo, Resolver resolver, const fc::microseconds& max_serialization_time ) {
      |      ^~~~~~~~~~~~~~
.../programs/cleos/main.cpp:503:112: warning: ‘static void eosio::chain::abi_serializer::to_variant(const T&, fc::variant&, Resolver, const fc::microseconds&) [with T = eosio::chain::signed_transaction; Resolver = <lambda(const eosio::chain::name&)>]’ is deprecated: use the overload with yield_function_t[=create_yield_function(max_serialization_time)] [-Wdeprecated-declarations]
  503 |             abi_serializer::to_variant(trx, unpacked_data_trx, abi_serializer_resolver, abi_serializer_max_time);
      |                                                                                                                ^
In file included from /.../libraries/chain/include/eosio/chain/controller.hpp:9,
                 from .../plugins/chain_plugin/include/eosio/chain_plugin/chain_plugin.hpp:7,
                 from .../programs/cleos/main.cpp:83:
.../libraries/chain/include/eosio/chain/abi_serializer.hpp:947:6: note: declared here
  947 | void abi_serializer::to_variant( const T& o, fc::variant& vo, Resolver resolver, const fc::microseconds& max_serialization_time ) {
      |      ^~~~~~~~~~~~~~
.../programs/cleos/main.cpp: In function ‘int main(int, char**)’:
.../programs/cleos/main.cpp:3178:9: warning: variable ‘getSchedule’ set but not used [-Wunused-but-set-variable]
 3178 |    auto getSchedule = get_schedule_subcommand{get};
      |         ^~~~~~~~~~~
.../programs/cleos/main.cpp: In function ‘eosio::chain::packed_transaction::compression_type to_compression_type(tx_compression_type)’:
.../programs/cleos/main.cpp:216:1: warning: control reaches end of non-void function [-Wreturn-type]
  216 | }
      | ^

@linh2931 linh2931 self-assigned this Jul 8, 2022
@@ -3175,7 +3176,6 @@ int main( int argc, char** argv ) {
}
});

auto getSchedule = get_schedule_subcommand{get};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will removal of get_schedule_subcommand{get} eliminate the get schedule command entirely? It seems like maybe only the auto getSchedule = should be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, you are correct. Added get_schedule_subcommand{get}; back.

@linh2931 linh2931 merged commit aab34be into main Jul 8, 2022
@linh2931 linh2931 deleted the fix_cleos_warning branch July 8, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile warnings in cleos main.cpp
2 participants