mirror of
https://github.com/vtil-project/VTIL-Core
synced 2026-08-17 08:23:03 -04:00
Fixing some warnings.
This commit is contained in:
parent
64d225f80c
commit
2bac0c4e9b
7 changed files with 10 additions and 18 deletions
|
|
@ -164,7 +164,7 @@ namespace vtil
|
|||
is_valid( true );
|
||||
}
|
||||
constexpr register_desc( uint32_t flags, uint64_t id, bitcnt_t bit_count, bitcnt_t bit_offset = 0, uint64_t architecture = 0 )
|
||||
: flags( ( register_flag ) flags ), local_id( id ), bit_count( bit_count ), bit_offset( bit_offset ), architecture( architecture )
|
||||
: flags( ( register_flag ) flags ), local_id( id ), architecture( architecture ), bit_count( bit_count ), bit_offset( bit_offset )
|
||||
{
|
||||
is_valid( true );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -288,7 +288,7 @@ namespace vtil
|
|||
basic_block( routine* owner, vip_t entry_vip )
|
||||
: owner( owner ), entry_vip( entry_vip ), epoch( make_random<epoch_t>() ) {}
|
||||
basic_block( const basic_block& o )
|
||||
: owner( o.owner ), entry_vip( o.entry_vip ), next( o.next ), prev( o.prev ),
|
||||
: owner( o.owner ), entry_vip( o.entry_vip ), prev( o.prev ), next( o.next ),
|
||||
sp_index( o.sp_index ), sp_offset( o.sp_offset ), last_temporary_index( o.last_temporary_index ),
|
||||
label_stack( o.label_stack ), epoch( o.epoch )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ namespace vtil
|
|||
// Constructed from architecture identifier.
|
||||
//
|
||||
routine( architecture_identifier arch_id )
|
||||
: arch_id( arch_id ), epoch( make_random<epoch_t>() ), cfg_epoch( make_random<epoch_t>() )
|
||||
: arch_id( arch_id ), cfg_epoch( make_random<epoch_t>() ), epoch( make_random<epoch_t>() )
|
||||
{
|
||||
switch ( arch_id )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace vtil::symbolic
|
|||
|
||||
// Declare common bit selector.
|
||||
//
|
||||
constexpr auto select = [ ] ( expression::reference& value, bitcnt_t size, bitcnt_t offset )
|
||||
constexpr auto select = [ ] ( expression::reference value, bitcnt_t size, bitcnt_t offset ) -> expression::reference
|
||||
{
|
||||
if ( offset < 0 ) value >>= -offset, value.resize( size );
|
||||
else if ( offset > 0 ) value.resize( size ) <<= offset;
|
||||
|
|
@ -138,10 +138,10 @@ namespace vtil::symbolic
|
|||
if ( mask_pending )
|
||||
result = MEMORY( reference_iterator )( ptr, size ) & expression { mask_pending, size };
|
||||
else
|
||||
result = select( merge_list.back().second, size, merge_list.back().first ), merge_list.pop_back();
|
||||
result = select( std::move( merge_list.back().second ), size, merge_list.back().first ), merge_list.pop_back();
|
||||
|
||||
for ( auto& [dst, value] : merge_list )
|
||||
result |= std::move( select( value, size, dst ) );
|
||||
result |= select( std::move( value ), size, dst );
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,8 +178,8 @@ namespace vtil::symbolic::directive
|
|||
// and type of expressions it can match.
|
||||
//
|
||||
const char* id = nullptr;
|
||||
matching_type mtype = match_any;
|
||||
int lookup_index = 0;
|
||||
matching_type mtype = match_any;
|
||||
|
||||
// Priority hint for transformer.
|
||||
//
|
||||
|
|
@ -221,7 +221,7 @@ namespace vtil::symbolic::directive
|
|||
// Constructor for directive representing the result of an unary operator.
|
||||
//
|
||||
instance( math::operator_id op, const instance& e1 ) :
|
||||
rhs( e1 ), op( op ), num_nodes( e1.num_nodes + 1 )
|
||||
op( op ), rhs( e1 ), num_nodes( e1.num_nodes + 1 )
|
||||
{
|
||||
for ( auto [out, rhs] : zip( signatures, e1.signatures ) )
|
||||
out = { op, rhs };
|
||||
|
|
@ -237,7 +237,7 @@ namespace vtil::symbolic::directive
|
|||
// Constructor for directive representing the result of a binary operator.
|
||||
//
|
||||
instance( const instance& e1, math::operator_id op, const instance& e2 ) :
|
||||
lhs( e1 ), rhs( e2 ), op( op ), num_nodes( e1.num_nodes + e2.num_nodes + 1 )
|
||||
op( op ), lhs( e1 ), rhs( e2 ), num_nodes( e1.num_nodes + e2.num_nodes + 1 )
|
||||
{
|
||||
for ( auto [lhs, out, rhs] : zip( e1.signatures, signatures, e2.signatures ) )
|
||||
out = { lhs, op, rhs };
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ namespace vtil::symbolic
|
|||
changed = true;
|
||||
owning->rhs = nrhs;
|
||||
if ( auto& lhs = owning->lhs )
|
||||
( bool ) lhs.transform_rec( func, bottom, auto_simplify );
|
||||
lhs.transform_rec( func, bottom, auto_simplify );
|
||||
}
|
||||
// If not, but LHS exists:
|
||||
//
|
||||
|
|
|
|||
|
|
@ -126,14 +126,6 @@ namespace vtil::symbolic
|
|||
~depth_tracker() { if ( s->max_depth ) s->max_depth++; }
|
||||
};
|
||||
|
||||
// Default move, no copy.
|
||||
//
|
||||
simplifier_state() {}
|
||||
simplifier_state( simplifier_state&& ) = default;
|
||||
simplifier_state( const simplifier_state& ) = delete;
|
||||
simplifier_state& operator=( simplifier_state&& ) = default;
|
||||
simplifier_state& operator=( const simplifier_state& ) = delete;
|
||||
|
||||
// Resets the cache.
|
||||
//
|
||||
void reset() { cache.clear(); }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue