mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
ci: fix v -cc clang-11 -cflags -Werror cmd/v
This commit is contained in:
parent
34aa67b1e8
commit
5c07cbf5d3
3 changed files with 19 additions and 19 deletions
|
@ -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..]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue