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:
@ -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))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user