mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: warn when casting between reference types outside of unsafe (#7892)
This commit is contained in:
@@ -40,7 +40,7 @@ fn new_addr(addr C.sockaddr) ?Addr {
|
||||
}
|
||||
mut saddr := buf.bytestr()
|
||||
|
||||
hport := (&C.sockaddr_in(&addr)).sin_port
|
||||
hport := unsafe {&C.sockaddr_in(&addr)}.sin_port
|
||||
port := C.ntohs(hport)
|
||||
|
||||
$if windows {
|
||||
|
||||
Reference in New Issue
Block a user