diff --git a/plugins/trace_api_plugin/compressed_file.cpp b/plugins/trace_api_plugin/compressed_file.cpp index fc9aee8e0d..f3eec78a28 100644 --- a/plugins/trace_api_plugin/compressed_file.cpp +++ b/plugins/trace_api_plugin/compressed_file.cpp @@ -109,13 +109,13 @@ struct compressed_file_impl { } } - void seek( long loc, fc::cfile& file ) { + void seek( uint64_t loc, fc::cfile& file ) { if (initialized) { inflateEnd(&strm); initialized = false; } - long remaining = loc; + auto remaining = loc; // read in the seek point map file.seek_end(-expected_seek_point_count_size); @@ -130,7 +130,7 @@ struct compressed_file_impl { file.read(reinterpret_cast(seek_point_map.data()), seek_point_map.size() * sizeof(seek_point_entry)); // seek to the neareast seek point - auto iter = std::lower_bound(seek_point_map.begin(), seek_point_map.end(), (uint64_t)loc, []( const auto& lhs, const auto& rhs ){ + auto iter = std::lower_bound(seek_point_map.begin(), seek_point_map.end(), loc, []( const auto& lhs, const auto& rhs ){ return std::get<0>(lhs) < rhs; }); @@ -179,7 +179,7 @@ compressed_file::compressed_file( fc::path file_path ) compressed_file::~compressed_file() {} -void compressed_file::seek( long loc ) { +void compressed_file::seek( uint64_t loc ) { impl->seek(loc, *file_ptr); } @@ -233,7 +233,7 @@ bool compressed_file::process( const fc::path& input_path, const fc::path& outpu auto output_buffer = std::vector(buffer_size); auto bytes_remaining_before_sync = seek_point_stride; - int next_sync_point = 0; + size_t next_sync_point = 0; // process a single chunk of input completely, // this may sometime loop multiple times if the compressor state combined with input data creates more than a @@ -312,4 +312,4 @@ bool compressed_file::process( const fc::path& input_path, const fc::path& outpu return true; } -} \ No newline at end of file +} diff --git a/plugins/trace_api_plugin/include/eosio/trace_api/compressed_file.hpp b/plugins/trace_api_plugin/include/eosio/trace_api/compressed_file.hpp index ebc2634a4c..c94582030b 100644 --- a/plugins/trace_api_plugin/include/eosio/trace_api/compressed_file.hpp +++ b/plugins/trace_api_plugin/include/eosio/trace_api/compressed_file.hpp @@ -76,7 +76,7 @@ namespace eosio::trace_api { * @throws std::ios_base::failure if this would seek past the end of the file * @throws compressed_file_error if the compressed data stream is corrupt or unreadable */ - void seek( long loc ); + void seek( uint64_t loc ); /** * Read a given number of uncompressed bytes to the buffer pointed to by `d`. @@ -165,4 +165,4 @@ namespace eosio::trace_api { using std::runtime_error::runtime_error; }; -} \ No newline at end of file +} diff --git a/plugins/trace_api_plugin/trace_api_plugin.cpp b/plugins/trace_api_plugin/trace_api_plugin.cpp index 87c3dea18f..c3c37bd24d 100644 --- a/plugins/trace_api_plugin/trace_api_plugin.cpp +++ b/plugins/trace_api_plugin/trace_api_plugin.cpp @@ -359,10 +359,6 @@ struct trace_api_plugin_impl { trace_api_plugin_impl( const std::shared_ptr& common ) :common(common) {} - static void set_program_options(appbase::options_description& cli, appbase::options_description& cfg) { - auto cfg_options = cfg.add_options(); - } - void plugin_initialize(const appbase::variables_map& options) { ilog("initializing trace api plugin"); auto log_exceptions_and_shutdown = [](const exception_with_context& e) { @@ -431,7 +427,6 @@ trace_api_plugin::~trace_api_plugin() void trace_api_plugin::set_program_options(appbase::options_description& cli, appbase::options_description& cfg) { trace_api_common_impl::set_program_options(cli, cfg); - trace_api_plugin_impl::set_program_options(cli, cfg); trace_api_rpc_plugin_impl::set_program_options(cli, cfg); }