mirror of
https://github.com/Z3Prover/z3
synced 2026-02-10 19:05:25 +00:00
Fix implicit conversion warnings: use UINT_MAX instead of -1 for unsi… (#8342)
* Fix implicit conversion warnings: use UINT_MAX instead of -1 for unsigned variables Replace implicit conversion from negative literal to unsigned type with explicit UINT_MAX constant to eliminate compiler warnings. Fixed 10 instances across 6 files: - src/ast/rewriter/bv_rewriter.cpp: 1 instance - src/ast/sls/sls_bv_tracker.h: 2 instances - src/math/lp/dioph_eq.cpp: 3 instances - src/math/lp/lp_primal_core_solver.h: 2 instances - src/muz/transforms/dl_mk_array_instantiation.cpp: 1 instance - src/muz/transforms/dl_mk_synchronize.cpp: 1 instance These changes preserve the exact same runtime behavior (UINT_MAX equals the wrapped value of -1 for unsigned types) while making the code more explicit and warning-free. * Update bv_rewriter.cpp --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
023377f3c8
commit
8a0207700c
6 changed files with 10 additions and 11 deletions
|
|
@ -277,7 +277,7 @@ namespace datalog {
|
|||
new_args.push_back(arg_correspondance[i][chosen[i]].get());
|
||||
}
|
||||
res.push_back(create_pred(old_pred, new_args));
|
||||
unsigned pos=-1;
|
||||
unsigned pos = UINT_MAX;
|
||||
do {
|
||||
pos++;
|
||||
if(pos==chosen.size()){
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ namespace datalog {
|
|||
bool_vector new_tail_neg;
|
||||
new_tail.resize(product_tail_length);
|
||||
new_tail_neg.resize(product_tail_length);
|
||||
unsigned tail_idx = -1;
|
||||
unsigned tail_idx = UINT_MAX;
|
||||
if (has_recursion) {
|
||||
add_rec_tail(recursive_calls, new_tail, new_tail_neg, tail_idx);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue