Clean up uninitialized integers

This commit is contained in:
theoreticalbts 2015-09-24 18:21:38 -04:00
parent 4c619414ae
commit f972cff9d7
10 changed files with 16 additions and 16 deletions

View file

@ -134,7 +134,7 @@ namespace graphene { namespace chain {
account_id_type lifetime_referrer; account_id_type lifetime_referrer;
/// Percentage of fee which should go to network. /// 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. /// Percentage of fee which should go to lifetime referrer.
uint16_t lifetime_referrer_fee_percentage = 0; uint16_t lifetime_referrer_fee_percentage = 0;
/// Percentage of referral rewards (leftover fee after paying network and lifetime referrer) which should go /// Percentage of referral rewards (leftover fee after paying network and lifetime referrer) which should go

View file

@ -50,7 +50,7 @@ struct skip_flags_restorer
} }
node_property_object& _npo; node_property_object& _npo;
uint32_t _old_skip_flags; uint32_t _old_skip_flags; // initialized in ctor
}; };
/** /**

View file

@ -37,7 +37,7 @@ namespace graphene { namespace chain {
block_id_type previous_id()const { return data.previous; } block_id_type previous_id()const { return data.previous; }
weak_ptr< fork_item > prev; 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 * Used to flag a block as invalid and prevent other blocks from
* building on top of it. * building on top of it.

View file

@ -40,7 +40,7 @@ struct genesis_state_type {
string issuer_name; string issuer_name;
string description; string description;
uint8_t precision; uint8_t precision = GRAPHENE_BLOCKCHAIN_PRECISION_DIGITS;
share_type max_supply; share_type max_supply;
share_type accumulated_fees; share_type accumulated_fees;
@ -84,7 +84,7 @@ struct genesis_state_type {
vector<initial_asset_type> initial_assets; vector<initial_asset_type> initial_assets;
vector<initial_balance_type> initial_balances; vector<initial_balance_type> initial_balances;
vector<initial_vesting_balance_type> initial_vesting_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_witness_type> initial_witness_candidates;
vector<initial_committee_member_type> initial_committee_candidates; vector<initial_committee_member_type> initial_committee_candidates;
vector<initial_worker_type> initial_worker_candidates; vector<initial_worker_type> initial_worker_candidates;

View file

@ -33,9 +33,9 @@ namespace graphene { namespace chain {
class node_property_object class node_property_object
{ {
public: public:
node_property_object() : skip_flags(0) {} node_property_object(){}
~node_property_object(){} ~node_property_object(){}
uint32_t skip_flags; uint32_t skip_flags = 0;
}; };
} } // graphene::chain } } // graphene::chain

View file

@ -141,7 +141,7 @@ namespace graphene { namespace chain {
account_id_type account_to_list; account_id_type account_to_list;
/// The new white and blacklist status of account_to_list, as determined by authorizing_account /// 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 /// 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; extensions_type extensions;
account_id_type fee_payer()const { return authorizing_account; } account_id_type fee_payer()const { return authorizing_account; }

View file

@ -21,7 +21,7 @@ namespace graphene { namespace chain {
asset fee; asset fee;
account_id_type payer; account_id_type payer;
flat_set<account_id_type> required_auths; flat_set<account_id_type> required_auths;
uint16_t id; uint16_t id = 0;
vector<char> data; vector<char> data;
account_id_type fee_payer()const { return payer; } account_id_type fee_payer()const { return payer; }

View file

@ -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 * 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. * of entropy for generating private keys.
*/ */
uint64_t nonce; uint64_t nonce = 0;
/** /**
* This field contains the AES encrypted packed @ref memo_message * This field contains the AES encrypted packed @ref memo_message
*/ */

View file

@ -225,8 +225,8 @@ namespace graphene { namespace chain {
{ {
struct binary_key struct binary_key
{ {
binary_key():check(0){} binary_key() {}
uint32_t check; uint32_t check = 0;
fc::ecc::public_key_data data; fc::ecc::public_key_data data;
}; };
fc::ecc::public_key_data key_data; fc::ecc::public_key_data key_data;

View file

@ -35,9 +35,9 @@ namespace graphene { namespace chain {
/// The maximum amount authorized_account is allowed to withdraw in a given withdrawal period /// The maximum amount authorized_account is allowed to withdraw in a given withdrawal period
asset withdrawal_limit; asset withdrawal_limit;
/// Length of the withdrawal period in seconds /// 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 /// 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 at which the first withdrawal period begins; must be in the future
time_point_sec period_start_time; 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 /// New maximum amount the withdrawer is allowed to charge per withdrawal period
asset withdrawal_limit; asset withdrawal_limit;
/// New length of the period between withdrawals /// 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 /// New beginning of the next withdrawal period; must be in the future
time_point_sec period_start_time; time_point_sec period_start_time;
/// The new number of withdrawal periods for which this permission will be valid /// 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; } account_id_type fee_payer()const { return withdraw_from_account; }
void validate()const; void validate()const;