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

ci: fix v -cc clang-11 -cflags -Werror cmd/v

This commit is contained in:
Delyan Angelov
2021-04-05 08:08:51 +03:00
parent 34aa67b1e8
commit 5c07cbf5d3
3 changed files with 19 additions and 19 deletions

View File

@ -25,7 +25,7 @@ pub fn getenv(key string) string {
return ''
}
// NB: C.getenv *requires* that the result be copied.
return cstring_to_vstring(&byte(s))
return cstring_to_vstring(s)
}
}
}
@ -99,7 +99,7 @@ pub fn environ() map[string]string {
if isnil(derefed) {
break
}
eline := unsafe { cstring_to_vstring(&byte(derefed)) }
eline := unsafe { cstring_to_vstring(derefed) }
eq_index := eline.index_byte(`=`)
if eq_index > 0 {
res[eline[0..eq_index]] = eline[eq_index + 1..]