1
0
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:
Nick Treleaven
2021-02-17 19:45:11 +00:00
committed by GitHub
parent 177c8bfc78
commit 4ccf991f61
7 changed files with 19 additions and 17 deletions

View File

@ -215,7 +215,7 @@ pub fn (mut ws Client) parse_frame_header() ?Frame {
mut rbuff := [1]byte{}
mut mask_end_byte := 0
for ws.state == .open {
read_bytes := ws.socket_read_ptr(byteptr(rbuff), 1) ?
read_bytes := ws.socket_read_ptr(&rbuff[0], 1) ?
if read_bytes == 0 {
// this is probably a timeout or close
continue