@@ -646,6 +646,7 @@ void display_model(Z3_context c, FILE * out, Z3_model m)
646
646
a = Z3_mk_app (c , cnst , 0 , 0 );
647
647
v = a ;
648
648
ok = Z3_model_eval (c , m , a , 1 , & v );
649
+ (void )ok ;
649
650
display_ast (c , out , v );
650
651
fprintf (out , "\n" );
651
652
}
@@ -1377,12 +1378,11 @@ void tuple_example1()
1377
1378
{
1378
1379
/* demonstrate how to use the mk_tuple_update function */
1379
1380
/* prove that p2 = update(p1, 0, 10) implies get_x(p2) = 10 */
1380
- Z3_ast p1 , p2 , one , ten , updt , x , y ;
1381
+ Z3_ast p1 , p2 , ten , updt , x , y ;
1381
1382
Z3_ast antecedent , consequent , thm ;
1382
1383
1383
1384
p1 = mk_var (ctx , "p1" , pair_sort );
1384
1385
p2 = mk_var (ctx , "p2" , pair_sort );
1385
- one = Z3_mk_numeral (ctx , "1" , real_sort );
1386
1386
ten = Z3_mk_numeral (ctx , "10" , real_sort );
1387
1387
updt = mk_tuple_update (ctx , p1 , 0 , ten );
1388
1388
antecedent = Z3_mk_eq (ctx , p2 , updt );
@@ -1558,7 +1558,6 @@ void error_code_example1()
1558
1558
Z3_ast x ;
1559
1559
Z3_model m ;
1560
1560
Z3_ast v ;
1561
- Z3_func_decl x_decl ;
1562
1561
const char * str ;
1563
1562
1564
1563
printf ("\nerror_code_example1\n" );
@@ -1571,7 +1570,6 @@ void error_code_example1()
1571
1570
s = mk_solver (ctx );
1572
1571
1573
1572
x = mk_bool_var (ctx , "x" );
1574
- x_decl = Z3_get_app_decl (ctx , Z3_to_app (ctx , x ));
1575
1573
Z3_solver_assert (ctx , s , x );
1576
1574
1577
1575
if (Z3_solver_check (ctx , s ) != Z3_L_TRUE ) {
@@ -1588,6 +1586,7 @@ void error_code_example1()
1588
1586
}
1589
1587
/* The following call will fail since the value of x is a boolean */
1590
1588
str = Z3_get_numeral_string (ctx , v );
1589
+ (void )str ;
1591
1590
if (Z3_get_error_code (ctx ) != Z3_OK ) {
1592
1591
printf ("last call failed.\n" );
1593
1592
}
@@ -1619,6 +1618,7 @@ void error_code_example2() {
1619
1618
printf ("before Z3_mk_iff\n" );
1620
1619
/* the next call will produce an error */
1621
1620
app = Z3_mk_iff (ctx , x , y );
1621
+ (void )app ;
1622
1622
e = Z3_get_error_code (ctx );
1623
1623
if (e != Z3_OK ) goto err ;
1624
1624
unreachable ();
@@ -2080,6 +2080,10 @@ void forest_example() {
2080
2080
Z3_query_constructor (ctx , cons2_con , 2 , & cons2_decl , & is_cons2_decl , cons_accessors );
2081
2081
car2_decl = cons_accessors [0 ];
2082
2082
cdr2_decl = cons_accessors [1 ];
2083
+ (void )cdr2_decl ;
2084
+ (void )car2_decl ;
2085
+ (void )car1_decl ;
2086
+ (void )cdr1_decl ;
2083
2087
2084
2088
Z3_del_constructor_list (ctx , clist1 );
2085
2089
Z3_del_constructor_list (ctx , clist2 );
@@ -2097,7 +2101,10 @@ void forest_example() {
2097
2101
t4 = mk_binary_app (ctx , cons2_decl , nil1 , f1 );
2098
2102
f2 = mk_binary_app (ctx , cons1_decl , t1 , nil1 );
2099
2103
f3 = mk_binary_app (ctx , cons1_decl , t1 , f1 );
2100
-
2104
+ (void )f3 ;
2105
+ (void )f2 ;
2106
+ (void )t4 ;
2107
+ (void )t2 ;
2101
2108
2102
2109
/* nil != cons(nil,nil) */
2103
2110
prove (ctx , s , Z3_mk_not (ctx , Z3_mk_eq (ctx , nil1 , f1 )), true);
@@ -2165,6 +2172,7 @@ void binary_tree_example() {
2165
2172
2166
2173
/* create the new recursive datatype */
2167
2174
cell = Z3_mk_datatype (ctx , Z3_mk_string_symbol (ctx , "BinTree" ), 2 , constructors );
2175
+ (void )cell ;
2168
2176
2169
2177
/* retrieve the new declarations: constructors (nil_decl, node_decl), testers (is_nil_decl, is_cons_del), and
2170
2178
accessors (value_decl, left_decl, right_decl */
@@ -2447,6 +2455,7 @@ void incremental_example1() {
2447
2455
c3 = assert_retractable_cnstr (ext_ctx , Z3_mk_gt (ctx , x , two ));
2448
2456
/* assert y < 1 */
2449
2457
c4 = assert_retractable_cnstr (ext_ctx , Z3_mk_lt (ctx , y , one ));
2458
+ (void )c1 ;
2450
2459
2451
2460
result = ext_check (ext_ctx );
2452
2461
if (result != Z3_L_FALSE )
0 commit comments