mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: warn when casting number or a voidptr to reference type outside unsafe (#7900)
This commit is contained in:
@@ -143,7 +143,7 @@ fn mysubstr(s byteptr, from int, len int) string {
|
||||
}
|
||||
|
||||
fn rw_callback(loop &C.picoev_loop, fd int, events int, cb_arg voidptr) {
|
||||
mut p := &Picoev(cb_arg)
|
||||
mut p := unsafe {&Picoev(cb_arg)}
|
||||
if (events & C.PICOEV_TIMEOUT) != 0 {
|
||||
close_conn(loop, fd)
|
||||
p.idx[fd] = 0
|
||||
|
Reference in New Issue
Block a user