mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix linux warnings in generated C code
This commit is contained in:
@@ -160,7 +160,7 @@ fn (m mut map) rehash(old_range_cap u32) {
|
||||
memory := calloc(probe_hash_bytes + key_value_bytes)
|
||||
mut new_key_values := &KeyValue(memory)
|
||||
mut new_probe_hash := &u32(memory + key_value_bytes)
|
||||
for i in 0 .. (old_range_cap + 1) {
|
||||
for i := u32(0); i < old_range_cap + 1; i++ {
|
||||
if m.probe_hash[i] != 0 {
|
||||
mut kv := m.key_values[i]
|
||||
hash := wyhash.wyhash_c(kv.key.str, u64(kv.key.len), 0)
|
||||
@@ -210,7 +210,7 @@ fn (m mut map) cached_rehash(old_range_cap u32) {
|
||||
memory := calloc(probe_hash_bytes + key_value_bytes)
|
||||
mut new_probe_hash := &u32(memory + key_value_bytes)
|
||||
mut new_key_values := &KeyValue(memory)
|
||||
for i in 0 .. (old_range_cap + 1) {
|
||||
for i := u32(0); i < old_range_cap + 1; i++ {
|
||||
if m.probe_hash[i] != 0 {
|
||||
mut kv := m.key_values[i]
|
||||
mut probe_hash := m.probe_hash[i]
|
||||
@@ -332,7 +332,7 @@ pub fn (m &map) keys() []string {
|
||||
return keys
|
||||
}
|
||||
mut j := 0
|
||||
for i in 0 .. (m.range_cap + 1) {
|
||||
for i := u32(0); i < m.range_cap + 1; i++ {
|
||||
if m.probe_hash[i] != 0 {
|
||||
keys[j] = m.key_values[i].key
|
||||
j++
|
||||
|
||||
Reference in New Issue
Block a user