diff options
| author | Kevin Watters <kevinwatters@gmail.com> | 2019-03-25 09:23:46 -0400 |
|---|---|---|
| committer | Kevin Watters <kevinwatters@gmail.com> | 2019-03-25 09:23:46 -0400 |
| commit | e6f9b4fb11285c5ceea3b3cc7cee26aa9f5ae3d2 (patch) | |
| tree | f7727e60f800c094f643336ee00e82b7dbc2b90d /core | |
| parent | b978959fae1c7449f24706fb3e33630b617a73f0 (diff) | |
Fix some -vet warnings; change import to core:math/bits
Diffstat (limited to 'core')
| -rw-r--r-- | core/encoding/json/marshal.odin | 2 | ||||
| -rw-r--r-- | core/encoding/json/tokenizer.odin | 4 | ||||
| -rw-r--r-- | core/encoding/json/types.odin | 2 | ||||
| -rw-r--r-- | core/strconv/strconv.odin | 4 |
4 files changed, 5 insertions, 7 deletions
diff --git a/core/encoding/json/marshal.odin b/core/encoding/json/marshal.odin index d25758275..4f5ee6880 100644 --- a/core/encoding/json/marshal.odin +++ b/core/encoding/json/marshal.odin @@ -1,7 +1,7 @@ package json import "core:mem" -import "core:bits" +import "core:math/bits" import "core:runtime" import "core:strconv" import "core:strings" diff --git a/core/encoding/json/tokenizer.odin b/core/encoding/json/tokenizer.odin index dd1704ba7..f9da8437e 100644 --- a/core/encoding/json/tokenizer.odin +++ b/core/encoding/json/tokenizer.odin @@ -436,8 +436,8 @@ is_valid_string_literal :: proc(s: string, spec: Specification) -> bool { i += 5; for j := 0; j < 4; j += 1 { - c := hex[j]; - switch c { + c2 := hex[j]; + switch c2 { case '0'..'9', 'a'..'z', 'A'..'Z': // Okay case: diff --git a/core/encoding/json/types.odin b/core/encoding/json/types.odin index 6973d3dc5..036fe50b4 100644 --- a/core/encoding/json/types.odin +++ b/core/encoding/json/types.odin @@ -1,7 +1,5 @@ package json -import "core:strconv" - Specification :: enum { JSON, JSON5, diff --git a/core/strconv/strconv.odin b/core/strconv/strconv.odin index 0b1f10f6c..0a48ce68b 100644 --- a/core/strconv/strconv.odin +++ b/core/strconv/strconv.odin @@ -230,8 +230,8 @@ quote :: proc(buf: []byte, s: string) -> string { write_byte(buf, &i, digits[s[0]>>4]); write_byte(buf, &i, digits[s[0]&0xf]); } - s := quote_rune(buf[i:], r); - i += len(s); + s2 := quote_rune(buf[i:], r); + i += len(s2); } write_byte(buf, &i, c); return string(buf[:i]); |