| 1 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:4:3: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 2 | 2 | mut v := 5 |
| 3 | 3 | mut p := &v |
| 4 | 4 | p++ |
| 5 | | ~~ |
| 6 | 5 | p += 2 |
| 7 | 6 | _ := v |
| 8 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:5:4: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 9 | 3 | mut p := &v |
| 10 | 4 | p++ |
| 11 | 5 | p += 2 |
| 12 | | ~~ |
| 13 | 6 | _ := v |
| 14 | 7 | } |
| 15 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:11:11: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 16 | 9 | fn test_ptr_infix() { |
| 17 | 10 | v := 4 |
| 18 | 11 | mut q := &v - 1 |
| 19 | | ~~~~~~ |
| 20 | 12 | q = q + 3 |
| 21 | 13 | _ := q |
| 22 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:12:6: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 23 | 10 | v := 4 |
| 24 | 11 | mut q := &v - 1 |
| 25 | 12 | q = q + 3 |
| 26 | | ~~~~~ |
| 27 | 13 | _ := q |
| 28 | 14 | _ := v |
| 29 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:23:11: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 30 | 21 | fn test_struct_ptr_infix() { |
| 31 | 22 | v := Foo{} |
| 32 | 23 | mut q := &v - 1 |
| 33 | | ~~~~~~ |
| 34 | 24 | q = q + 3 |
| 35 | 25 | _ := q |
| 36 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:24:6: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 37 | 22 | v := Foo{} |
| 38 | 23 | mut q := &v - 1 |
| 39 | 24 | q = q + 3 |
| 40 | | ~~~~~ |
| 41 | 25 | _ := q |
| 42 | 26 | _ := v |
| 43 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:32:11: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 44 | 30 | v := Foo{} |
| 45 | 31 | p := &v |
| 46 | 32 | mut q := &p - 1 |
| 47 | | ~~~~~~ |
| 48 | 33 | q = q + 3 |
| 49 | 34 | _ := q |
| 50 | vlib/v/checker/tests/unsafe_pointer_arithmetic_should_be_checked.vv:33:6: warning: pointer arithmetic is only allowed in `unsafe` blocks |
| 51 | 31 | p := &v |
| 52 | 32 | mut q := &p - 1 |
| 53 | 33 | q = q + 3 |
| 54 | | ~~~~~ |
| 55 | 34 | _ := q |
| 56 | 35 | _ := p |
| 57 | |