diff --git a/examples/clock/clock.v b/examples/clock/clock.v index ded4350734..ce52be964b 100644 --- a/examples/clock/clock.v +++ b/examples/clock/clock.v @@ -42,7 +42,7 @@ struct App { minute_hand []f32 = [f32(334.25), 40.25, 350, 24.5, 365.75, 40.25, 365.75, 427, 334.25, 427] second_hand []f32 = [f32(345.8), 38.5, 350, 34.3, 354.2000, 38.5, 358.75, 427, 341.25, 427] mut: - gg &gg.Context = 0 + gg &gg.Context = unsafe { 0 } draw_flag bool = true dpi_scale f32 = 1.0 } diff --git a/examples/fireworks/fireworks.v b/examples/fireworks/fireworks.v index 0efbd8fc4b..212e94069d 100644 --- a/examples/fireworks/fireworks.v +++ b/examples/fireworks/fireworks.v @@ -6,8 +6,8 @@ import rand struct App { mut: - gg &gg.Context = 0 - ui &objects.UIParams = 0 + gg &gg.Context = unsafe { 0 } + ui &objects.UIParams = unsafe { 0 } rockets []objects.Rocket frames [][]objects.Rocket // i thought about using a fixed fifo queue for the frames but the array diff --git a/examples/gg/mandelbrot.v b/examples/gg/mandelbrot.v index aed25116f9..6384afa692 100644 --- a/examples/gg/mandelbrot.v +++ b/examples/gg/mandelbrot.v @@ -31,7 +31,7 @@ fn (v &ViewRect) height() f64 { struct AppState { mut: - gg &gg.Context = 0 + gg &gg.Context = unsafe { 0 } iidx int pixels &u32 = unsafe { vcalloc(pwidth * pheight * sizeof(u32)) } npixels &u32 = unsafe { vcalloc(pwidth * pheight * sizeof(u32)) } // all drawing happens here, results are swapped at the end diff --git a/examples/gg/random.v b/examples/gg/random.v index f9e963b849..ecd0b989b4 100644 --- a/examples/gg/random.v +++ b/examples/gg/random.v @@ -9,7 +9,7 @@ const pbytes = 4 struct AppState { mut: - gg &gg.Context = 0 + gg &gg.Context = unsafe { 0 } istream_idx int pixels [pheight][pwidth]u32 } diff --git a/examples/pendulum-simulation/modules/sim/anim/app.v b/examples/pendulum-simulation/modules/sim/anim/app.v index 3453e7bc2e..ee12835035 100644 --- a/examples/pendulum-simulation/modules/sim/anim/app.v +++ b/examples/pendulum-simulation/modules/sim/anim/app.v @@ -19,7 +19,7 @@ pub: request_chan chan &sim.SimRequest result_chan chan &sim.SimResult pub mut: - gg &gg.Context = 0 + gg &gg.Context = unsafe { 0 } iidx int pixels []u32 } diff --git a/examples/term.ui/cursor_chaser.v b/examples/term.ui/cursor_chaser.v index df83dbbd2e..ba350cca6a 100644 --- a/examples/term.ui/cursor_chaser.v +++ b/examples/term.ui/cursor_chaser.v @@ -18,7 +18,7 @@ struct Point { struct App { mut: - tui &tui.Context = 0 + tui &tui.Context = unsafe { 0 } points []Point color tui.Color = colors[0] color_idx int diff --git a/examples/term.ui/pong.v b/examples/term.ui/pong.v index 48e3338d6e..a95a40b5be 100644 --- a/examples/term.ui/pong.v +++ b/examples/term.ui/pong.v @@ -19,11 +19,11 @@ const ( [heap] struct App { mut: - tui &ui.Context = 0 + tui &ui.Context = unsafe { 0 } mode Mode = Mode.menu width int height int - game &Game = 0 + game &Game = unsafe { 0 } dt f32 ticks i64 } diff --git a/vlib/net/smtp/smtp.v b/vlib/net/smtp/smtp.v index d4b4c563ca..2a114ca831 100644 --- a/vlib/net/smtp/smtp.v +++ b/vlib/net/smtp/smtp.v @@ -32,7 +32,7 @@ pub enum BodyType { pub struct Client { mut: conn net.TcpConn - ssl_conn &openssl.SSLConn = 0 + ssl_conn &openssl.SSLConn = unsafe { 0 } reader io.BufferedReader pub: server string diff --git a/vlib/picohttpparser/response.v b/vlib/picohttpparser/response.v index c7943520c2..2e49074822 100644 --- a/vlib/picohttpparser/response.v +++ b/vlib/picohttpparser/response.v @@ -3,8 +3,8 @@ module picohttpparser pub struct Response { fd int pub: - date &u8 = 0 - buf_start &u8 = 0 + date &u8 = unsafe { 0 } + buf_start &u8 = unsafe { 0 } pub mut: buf &u8 = 0 }