ci: fix -cflags -Werror jobs
parent
19b915b105
commit
d8cb24eef0
|
@ -170,15 +170,16 @@ pub fn execute(cmd string) Result {
|
||||||
output: 'exec("$cmd") failed'
|
output: 'exec("$cmd") failed'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf := unsafe { &char(malloc(4096)) }
|
buf := unsafe { malloc(4096) }
|
||||||
mut res := strings.new_builder(1024)
|
mut res := strings.new_builder(1024)
|
||||||
defer {
|
defer {
|
||||||
unsafe { res.free() }
|
unsafe { res.free() }
|
||||||
}
|
}
|
||||||
unsafe {
|
unsafe {
|
||||||
bufbp := buf
|
bufbp := buf
|
||||||
for C.fgets(bufbp, 4096, f) != 0 {
|
for C.fgets(&char(bufbp), 4096, f) != 0 {
|
||||||
res.write_ptr(bufbp, vstrlen(bufbp))
|
buflen := vstrlen(bufbp)
|
||||||
|
res.write_ptr(bufbp, buflen)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
soutput := res.str()
|
soutput := res.str()
|
||||||
|
|
Loading…
Reference in New Issue