Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit

Permalink
warnnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hriener committed Feb 6, 2019
1 parent a21b1fe commit 5f97db1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion include/caterpillar/synthesis/stg_to_mcx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct stg_from_esop
struct stg_from_exact_synthesis
{
public:
explicit stg_from_exact_synthesis( std::function<int( kitty::cube )> const& cost_fn = []( kitty::cube const& cube ) { return 1; } )
explicit stg_from_exact_synthesis( std::function<int( kitty::cube )> const& cost_fn = []( kitty::cube const& cube ) { (void)cube; return 1; } )
: cost_fn( cost_fn )
{
}
Expand Down
2 changes: 1 addition & 1 deletion lib/easy/easy/esop/cost.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace easy::esop
*/
inline uint64_t T_count( kitty::cube const& cube, uint32_t num_vars )
{
auto const ac = cube.num_literals();
uint32_t const ac = cube.num_literals();

switch( ac )
{
Expand Down
8 changes: 5 additions & 3 deletions lib/easy/easy/sat2/cardinality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ struct totalizer_tree
std::vector<int> vars;
uint32_t num_inputs;
std::shared_ptr<totalizer_tree> left;
std::shared_ptr<totalizer_tree> right;
std::shared_ptr<totalizer_tree> right;
}; /* totalizer_tree */

namespace detail
{

inline void create_totalizer_internal( std::vector<std::vector<int>>& dest, int& sid, std::vector<int> const& ov, uint32_t rhs, std::vector<int> const& av, std::vector<int> const& bv )
{
(void)sid;

/* i = 0 */
uint32_t kmin = std::min( rhs, uint32_t( bv.size() ) );
for ( auto j = 0u; j < kmin; ++j )
Expand All @@ -71,7 +73,7 @@ inline void create_totalizer_internal( std::vector<std::vector<int>>& dest, int&
{
dest.emplace_back( std::vector<int>{ -av[i], ov[i] } );
}

/* i, j > 0 */
for ( auto i = 1u; i <= kmin; ++i )
{
Expand All @@ -80,7 +82,7 @@ inline void create_totalizer_internal( std::vector<std::vector<int>>& dest, int&
{
dest.emplace_back( std::vector<int>{ -av[i-1], -bv[j-1], ov[i+j-1] } );
}
}
}
}

inline void increase_totalizer_internal( std::vector<std::vector<int>>& dest, int& sid, std::vector<int>& ov, uint32_t rhs, std::vector<int>& av, std::vector<int>& bv )
Expand Down
2 changes: 1 addition & 1 deletion lib/easy/easy/sat2/maxsat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ class maxsat_solver<maxsat_rc2>
}

/* updating bounds and weights */
if ( b < t->vars.size() )
if ( (unsigned long)(b) < t->vars.size() )
{
auto lnew = -t->vars[b];
if ( std::find( std::begin( garbage ), std::end( garbage ), lnew ) != std::end( garbage ) )
Expand Down

0 comments on commit 5f97db1

Please sign in to comment.