mirror of
https://github.com/Z3Prover/z3
synced 2026-01-21 01:24:43 +00:00
Fix 13 compiler warnings: sign-comparison and unused parameters (#8215)
* Initial plan * Fix 13 compiler warnings: sign-comparison and unused parameters Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
9666915dca
commit
36323f723b
10 changed files with 13 additions and 13 deletions
|
|
@ -400,7 +400,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
.MM(solver, units)
|
||||
.method("trail", static_cast<expr_vector (solver::*)() const>(&solver::trail))
|
||||
.method("trail", [](solver &s, jlcxx::ArrayRef<unsigned> levels) {
|
||||
int sz = levels.size();
|
||||
int sz = static_cast<int>(levels.size());
|
||||
z3::array<unsigned> _levels(sz);
|
||||
for (int i = 0; i < sz; ++i) {
|
||||
_levels[i] = levels[i];
|
||||
|
|
@ -629,7 +629,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
.MM(context, set_rounding_mode)
|
||||
.method("enumeration_sort",
|
||||
[](context& c, char const * name, jlcxx::ArrayRef<jl_value_t*,1> names, func_decl_vector &cs, func_decl_vector &ts) {
|
||||
int sz = names.size();
|
||||
int sz = static_cast<int>(names.size());
|
||||
std::vector<const char *> _names;
|
||||
for (int i = 0; i < sz; ++i) {
|
||||
const char *x = jl_string_data(names[i]);
|
||||
|
|
@ -639,7 +639,7 @@ JLCXX_MODULE define_julia_module(jlcxx::Module &m)
|
|||
})
|
||||
.method("tuple_sort",
|
||||
[](context& c, char const * name, jlcxx::ArrayRef<jl_value_t*,1> names, jlcxx::ArrayRef<jl_value_t*,1> sorts, func_decl_vector &projs) {
|
||||
int sz = names.size();
|
||||
int sz = static_cast<int>(names.size());
|
||||
std::vector<sort> _sorts;
|
||||
std::vector<const char *> _names;
|
||||
for (int i = 0; i < sz; ++i) {
|
||||
|
|
|
|||
|
|
@ -1972,7 +1972,7 @@ namespace sls {
|
|||
return 0.0000001;
|
||||
else if (result == 0)
|
||||
return 0.000002;
|
||||
for (int i = m_prob_break.size(); i <= breaks; ++i)
|
||||
for (int i = static_cast<int>(m_prob_break.size()); i <= breaks; ++i)
|
||||
m_prob_break.push_back(std::pow(m_config.cb, -i));
|
||||
return m_prob_break[breaks];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ private:
|
|||
// For imprecise types (e.g., floats) it should set the rounding mode.
|
||||
void round_to_minus_inf() {}
|
||||
void round_to_plus_inf() {}
|
||||
void set_rounding(bool to_plus_inf) {}
|
||||
void set_rounding(bool /*to_plus_inf*/) {}
|
||||
|
||||
// Getters
|
||||
mpq const& lower(interval const& a) const { return a.m_lower; }
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ public:
|
|||
// For imprecise types (e.g., floats) it should set the rounding mode.
|
||||
void round_to_minus_inf() {}
|
||||
void round_to_plus_inf() {}
|
||||
void set_rounding(bool to_plus_inf) {}
|
||||
void set_rounding(bool /*to_plus_inf*/) {}
|
||||
|
||||
// Getters
|
||||
numeral const & lower(interval const & a) const { return a.m_lower; }
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ public:
|
|||
TRACE(nla_cn, tout << "save c=" << **c << "; front:"; print_front(front, tout) << "\n";);
|
||||
nex* copy_of_c = *c;
|
||||
auto copy_of_front = copy_front(front);
|
||||
int alloc_size = m_nex_creator.size();
|
||||
int alloc_size = static_cast<int>(m_nex_creator.size());
|
||||
for (lpvar j : vars) {
|
||||
if (m_var_is_fixed(j)) {
|
||||
// it does not make sense to explore fixed multupliers
|
||||
|
|
|
|||
|
|
@ -2200,7 +2200,7 @@ namespace sat {
|
|||
backtrack(m_cube_state.m_cube, m_cube_state.m_is_decision);
|
||||
return l_undef;
|
||||
}
|
||||
int prev_nfreevars = m_freevars.size();
|
||||
int prev_nfreevars = static_cast<int>(m_freevars.size());
|
||||
double prev_psat = m_config.m_cube_cutoff == adaptive_psat_cutoff ? psat_heur() : dbl_max; // MN. only compute PSAT if enabled
|
||||
literal lit = choose();
|
||||
if (inconsistent()) {
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ class dl_graph {
|
|||
SASSERT(m_assignment.size() == m_parent.size());
|
||||
SASSERT(m_assignment.size() <= m_heap.get_bounds());
|
||||
SASSERT(m_in_edges.size() == m_out_edges.size());
|
||||
int n = m_out_edges.size();
|
||||
int n = static_cast<int>(m_out_edges.size());
|
||||
for (dl_var id = 0; id < n; ++id) {
|
||||
const edge_id_vector & e_ids = m_out_edges[id];
|
||||
for (edge_id e_id : e_ids) {
|
||||
|
|
@ -1195,7 +1195,7 @@ public:
|
|||
scc_id.reset();
|
||||
m_roots.reset();
|
||||
m_unfinished.reset();
|
||||
int n = m_assignment.size();
|
||||
int n = static_cast<int>(m_assignment.size());
|
||||
m_unfinished_set.resize(n, false);
|
||||
m_dfs_time.resize(n, -1);
|
||||
scc_id.resize(n, -1);
|
||||
|
|
|
|||
|
|
@ -1030,7 +1030,7 @@ namespace {
|
|||
|
||||
void add_to_queue2(expr * e)
|
||||
{
|
||||
int idx = m_queue2.size();
|
||||
int idx = static_cast<int>(m_queue2.size());
|
||||
|
||||
GOAL_START();
|
||||
m_queue2.push_back(queue_entry(e, get_generation(e)));
|
||||
|
|
|
|||
|
|
@ -2174,7 +2174,7 @@ namespace smt {
|
|||
bool is_pos = !is_neg;
|
||||
if (x_i != x_j && ((is_pos && above_lower(x_j)) || (is_neg && below_upper(x_j)))) {
|
||||
int num = get_num_non_free_dep_vars(x_j, best_so_far);
|
||||
int col_sz = m_columns[x_j].size();
|
||||
int col_sz = static_cast<int>(m_columns[x_j].size());
|
||||
if (num < best_so_far || (num == best_so_far && col_sz < best_col_sz)) {
|
||||
result = x_j;
|
||||
out_a_ij = a_ij;
|
||||
|
|
|
|||
|
|
@ -620,7 +620,7 @@ namespace smt {
|
|||
|
||||
template<typename Ext>
|
||||
bool theory_dense_diff_logic<Ext>::check_matrix() const {
|
||||
int sz = m_matrix.size();
|
||||
int sz = static_cast<int>(m_matrix.size());
|
||||
for (theory_var i = 0; i < sz; ++i) {
|
||||
for (theory_var j = 0; j < sz; ++j) {
|
||||
cell const & c = m_matrix[i][j];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue