mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: warn when casting a fixed array (use &arr[0]
instead) (#8787)
This commit is contained in:
@ -34,8 +34,7 @@ pub fn (mut con TcpConn) read_line() string {
|
||||
break
|
||||
}
|
||||
}
|
||||
bufbp := byteptr(buf)
|
||||
line = unsafe { tos_clone(bufbp) }
|
||||
line = unsafe { tos_clone(&buf[0]) }
|
||||
if eol_idx > 0 {
|
||||
// At this point, we are sure that recv returned valid data,
|
||||
// that contains *at least* one line.
|
||||
|
Reference in New Issue
Block a user