Clean up uninitialized integers
This commit is contained in:
parent
4c619414ae
commit
f972cff9d7
10 changed files with 16 additions and 16 deletions
|
|
@ -134,7 +134,7 @@ namespace graphene { namespace chain {
|
|||
account_id_type lifetime_referrer;
|
||||
|
||||
/// Percentage of fee which should go to network.
|
||||
uint16_t network_fee_percentage;
|
||||
uint16_t network_fee_percentage = GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE;
|
||||
/// Percentage of fee which should go to lifetime referrer.
|
||||
uint16_t lifetime_referrer_fee_percentage = 0;
|
||||
/// Percentage of referral rewards (leftover fee after paying network and lifetime referrer) which should go
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ struct skip_flags_restorer
|
|||
}
|
||||
|
||||
node_property_object& _npo;
|
||||
uint32_t _old_skip_flags;
|
||||
uint32_t _old_skip_flags; // initialized in ctor
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace graphene { namespace chain {
|
|||
block_id_type previous_id()const { return data.previous; }
|
||||
|
||||
weak_ptr< fork_item > prev;
|
||||
uint32_t num;
|
||||
uint32_t num; // initialized in ctor
|
||||
/**
|
||||
* Used to flag a block as invalid and prevent other blocks from
|
||||
* building on top of it.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ struct genesis_state_type {
|
|||
string issuer_name;
|
||||
|
||||
string description;
|
||||
uint8_t precision;
|
||||
uint8_t precision = GRAPHENE_BLOCKCHAIN_PRECISION_DIGITS;
|
||||
|
||||
share_type max_supply;
|
||||
share_type accumulated_fees;
|
||||
|
|
@ -84,7 +84,7 @@ struct genesis_state_type {
|
|||
vector<initial_asset_type> initial_assets;
|
||||
vector<initial_balance_type> initial_balances;
|
||||
vector<initial_vesting_balance_type> initial_vesting_balances;
|
||||
uint64_t initial_active_witnesses;
|
||||
uint64_t initial_active_witnesses = GRAPHENE_DEFAULT_MIN_WITNESS_COUNT;
|
||||
vector<initial_witness_type> initial_witness_candidates;
|
||||
vector<initial_committee_member_type> initial_committee_candidates;
|
||||
vector<initial_worker_type> initial_worker_candidates;
|
||||
|
|
|
|||
|
|
@ -33,9 +33,9 @@ namespace graphene { namespace chain {
|
|||
class node_property_object
|
||||
{
|
||||
public:
|
||||
node_property_object() : skip_flags(0) {}
|
||||
node_property_object(){}
|
||||
~node_property_object(){}
|
||||
|
||||
uint32_t skip_flags;
|
||||
uint32_t skip_flags = 0;
|
||||
};
|
||||
} } // graphene::chain
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ namespace graphene { namespace chain {
|
|||
account_id_type account_to_list;
|
||||
/// The new white and blacklist status of account_to_list, as determined by authorizing_account
|
||||
/// This is a bitfield using values defined in the account_listing enum
|
||||
uint8_t new_listing;
|
||||
uint8_t new_listing = no_listing;
|
||||
extensions_type extensions;
|
||||
|
||||
account_id_type fee_payer()const { return authorizing_account; }
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace graphene { namespace chain {
|
|||
asset fee;
|
||||
account_id_type payer;
|
||||
flat_set<account_id_type> required_auths;
|
||||
uint16_t id;
|
||||
uint16_t id = 0;
|
||||
vector<char> data;
|
||||
|
||||
account_id_type fee_payer()const { return payer; }
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace graphene { namespace chain {
|
|||
* be unique with high probability as long as the generating host has a high-resolution clock OR a strong source
|
||||
* of entropy for generating private keys.
|
||||
*/
|
||||
uint64_t nonce;
|
||||
uint64_t nonce = 0;
|
||||
/**
|
||||
* This field contains the AES encrypted packed @ref memo_message
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -225,8 +225,8 @@ namespace graphene { namespace chain {
|
|||
{
|
||||
struct binary_key
|
||||
{
|
||||
binary_key():check(0){}
|
||||
uint32_t check;
|
||||
binary_key() {}
|
||||
uint32_t check = 0;
|
||||
fc::ecc::public_key_data data;
|
||||
};
|
||||
fc::ecc::public_key_data key_data;
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ namespace graphene { namespace chain {
|
|||
/// The maximum amount authorized_account is allowed to withdraw in a given withdrawal period
|
||||
asset withdrawal_limit;
|
||||
/// Length of the withdrawal period in seconds
|
||||
uint32_t withdrawal_period_sec;
|
||||
uint32_t withdrawal_period_sec = 0;
|
||||
/// The number of withdrawal periods this permission is valid for
|
||||
uint32_t periods_until_expiration;
|
||||
uint32_t periods_until_expiration = 0;
|
||||
/// Time at which the first withdrawal period begins; must be in the future
|
||||
time_point_sec period_start_time;
|
||||
|
||||
|
|
@ -70,11 +70,11 @@ namespace graphene { namespace chain {
|
|||
/// New maximum amount the withdrawer is allowed to charge per withdrawal period
|
||||
asset withdrawal_limit;
|
||||
/// New length of the period between withdrawals
|
||||
uint32_t withdrawal_period_sec;
|
||||
uint32_t withdrawal_period_sec = 0;
|
||||
/// New beginning of the next withdrawal period; must be in the future
|
||||
time_point_sec period_start_time;
|
||||
/// The new number of withdrawal periods for which this permission will be valid
|
||||
uint32_t periods_until_expiration;
|
||||
uint32_t periods_until_expiration = 0;
|
||||
|
||||
account_id_type fee_payer()const { return withdraw_from_account; }
|
||||
void validate()const;
|
||||
|
|
|
|||
Loading…
Reference in a new issue