mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
src: fix issues found through static analysis
This commit is contained in:
@@ -110,6 +110,7 @@ class network_throttle_manager {
|
||||
*/
|
||||
class i_network_throttle {
|
||||
public:
|
||||
virtual ~i_network_throttle() = default;
|
||||
virtual void set_name(const std::string &name)=0;
|
||||
virtual void set_target_speed( network_speed_kbps target )=0;
|
||||
virtual network_speed_kbps get_target_speed()=0;
|
||||
|
||||
@@ -97,7 +97,6 @@ static void F8(hashState *state); /*The compression function F8 */
|
||||
static HashReturn Init(hashState *state, int hashbitlen);
|
||||
static HashReturn Update(hashState *state, const BitSequence *data, DataLength databitlen);
|
||||
static HashReturn Final(hashState *state, BitSequence *hashval);
|
||||
HashReturn jh_hash(int hashbitlen, const BitSequence *data,DataLength databitlen, BitSequence *hashval);
|
||||
|
||||
/*swapping bit 2i with bit 2i+1 of 64-bit x*/
|
||||
#define SWAP1(x) (x) = ((((x) & 0x5555555555555555ULL) << 1) | (((x) & 0xaaaaaaaaaaaaaaaaULL) >> 1));
|
||||
|
||||
@@ -130,14 +130,6 @@ namespace cryptonote
|
||||
crypto::public_key &out_eph_public_key,
|
||||
const bool use_view_tags, crypto::view_tag &view_tag) ;
|
||||
|
||||
bool generate_output_ephemeral_keys(const size_t tx_version, const cryptonote::account_keys &sender_account_keys, const crypto::public_key &txkey_pub, const crypto::secret_key &tx_key,
|
||||
const cryptonote::tx_destination_entry &dst_entr, const boost::optional<cryptonote::account_public_address> &change_addr, const size_t output_index,
|
||||
const bool &need_additional_txkeys, const std::vector<crypto::secret_key> &additional_tx_keys,
|
||||
std::vector<crypto::public_key> &additional_tx_public_keys,
|
||||
std::vector<rct::key> &amount_keys,
|
||||
crypto::public_key &out_eph_public_key,
|
||||
const bool use_view_tags, crypto::view_tag &view_tag) ;
|
||||
|
||||
bool generate_genesis_block(
|
||||
block& bl
|
||||
, std::string const & genesis_tx
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace cryptonote
|
||||
/************************************************************************/
|
||||
struct i_cryptonote_protocol
|
||||
{
|
||||
virtual ~i_cryptonote_protocol() = default;
|
||||
virtual bool is_synchronized() const = 0;
|
||||
virtual bool relay_block(NOTIFY_NEW_FLUFFY_BLOCK::request& arg, cryptonote_connection_context& exclude_context)=0;
|
||||
virtual bool relay_transactions(NOTIFY_NEW_TRANSACTIONS::request& arg, const boost::uuids::uuid& source, epee::net_utils::zone zone, relay_method tx_relay)=0;
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace hw {
|
||||
|
||||
class device_progress {
|
||||
public:
|
||||
virtual ~device_progress() = default;
|
||||
virtual double progress() const { return 0; }
|
||||
virtual bool indeterminate() const { return false; }
|
||||
};
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace hw {
|
||||
public:
|
||||
|
||||
device_io() {};
|
||||
~device_io() {};
|
||||
virtual ~device_io() = default;
|
||||
|
||||
virtual void init() = 0;
|
||||
virtual void release() = 0;
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace nodetool
|
||||
template<class t_connection_context>
|
||||
struct i_p2p_endpoint
|
||||
{
|
||||
virtual ~i_p2p_endpoint() = default;
|
||||
virtual bool relay_notify_to_list(int command, epee::levin::message_writer message, std::vector<std::pair<epee::net_utils::zone, boost::uuids::uuid>> connections)=0;
|
||||
virtual epee::net_utils::zone send_txs(std::vector<cryptonote::blobdata> txs, const epee::net_utils::zone origin, const boost::uuids::uuid& source, cryptonote::relay_method tx_relay)=0;
|
||||
virtual bool invoke_notify_to_peer(int command, epee::levin::message_writer message, const epee::net_utils::connection_context_base& context)=0;
|
||||
|
||||
Reference in New Issue
Block a user