1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: ban unsafe pointer/fn comparison (#14462)

This commit is contained in:
Vincenzo Palazzo
2022-05-20 17:30:16 +02:00
committed by GitHub
parent d81fbb1ccd
commit 17bba712bd
28 changed files with 111 additions and 68 deletions

View File

@@ -176,7 +176,7 @@ fn (mut p Process) win_write_string(idx int, s string) {
fn (mut p Process) win_read_string(idx int, maxbytes int) (string, int) {
mut wdata := &WProcess(p.wdata)
if wdata == 0 {
if unsafe { wdata == 0 } {
return '', 0
}
mut rhandle := &u32(0)
@@ -207,7 +207,7 @@ fn (mut p Process) win_read_string(idx int, maxbytes int) (string, int) {
fn (mut p Process) win_slurp(idx int) string {
mut wdata := &WProcess(p.wdata)
if wdata == 0 {
if unsafe { wdata == 0 } {
return ''
}
mut rhandle := &u32(0)