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

builtin,os: fix unused return C warnings for real (#9814)

This commit is contained in:
Nicolas Sauzede
2021-04-20 16:28:58 +02:00
committed by GitHub
parent 0b0a5de9e5
commit 258be508f4
3 changed files with 19 additions and 17 deletions

View File

@ -740,10 +740,11 @@ pub fn is_link(path string) bool {
// chdir changes the current working directory to the new directory in `path`.
pub fn chdir(path string) {
mut n := 0
$if windows {
C._wchdir(path.to_wide())
} $else {
C.chdir(&char(path.str))
n = C.chdir(&char(path.str))
}
}

View File

@ -3,11 +3,12 @@ module os
fn C.setpgid(pid int, pgid int) int
fn (mut p Process) unix_spawn_process() int {
mut n := 0
mut pipeset := [6]int{}
if p.use_stdio_ctl {
C.pipe(&pipeset[0]) // pipe read end 0 <- 1 pipe write end
C.pipe(&pipeset[2]) // pipe read end 2 <- 3 pipe write end
C.pipe(&pipeset[4]) // pipe read end 4 <- 5 pipe write end
n = C.pipe(&pipeset[0]) // pipe read end 0 <- 1 pipe write end
n = C.pipe(&pipeset[2]) // pipe read end 2 <- 3 pipe write end
n = C.pipe(&pipeset[4]) // pipe read end 4 <- 5 pipe write end
}
pid := fork()
if pid != 0 {