diff --git a/build.bat b/build.bat index 1a51f153b..fe99fb48d 100644 --- a/build.bat +++ b/build.bat @@ -18,9 +18,8 @@ set compiler_warnings= ^ -W4 -WX ^ -wd4100 -wd4101 -wd4127 -wd4189 ^ -wd4201 -wd4204 -wd4244 ^ - -wd4306 ^ - -wd4456 -wd4457 -wd4480 ^ - -wd4505 -wd4512 -wd4550 + -wd4456 -wd4457 ^ + -wd4512 set compiler_includes= set libs= ^ @@ -45,7 +44,6 @@ del *.ilk > NUL 2> NUL cl %compiler_settings% "src\main.cpp" ^ /link %linker_settings% -OUT:%exe_name% ^ && odin run examples/demo.odin - rem && odin docs core/fmt.odin del *.obj > NUL 2> NUL diff --git a/src/exact_value.cpp b/src/exact_value.cpp index ed181b9d0..c9ae402e0 100644 --- a/src/exact_value.cpp +++ b/src/exact_value.cpp @@ -46,9 +46,10 @@ struct ExactValue { gb_global ExactValue const empty_exact_value = {}; HashKey hash_exact_value(ExactValue v) { + HashKey empty = {}; switch (v.kind) { case ExactValue_Invalid: - return HashKey{}; + return empty; case ExactValue_Bool: return hash_integer(u64(v.value_bool)); case ExactValue_String: diff --git a/src/parser.cpp b/src/parser.cpp index 7b3bee25d..123230823 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -2671,10 +2671,10 @@ AstNode *parse_proc_type(AstFile *f, Token proc_token) { for_array(i, params->FieldList.list) { AstNode *param = params->FieldList.list[i]; - ast_node(f, Field, param); - if (f->type != nullptr) { - if (f->type->kind == AstNode_TypeType || - f->type->kind == AstNode_PolyType) { + ast_node(field, Field, param); + if (field->type != nullptr) { + if (field->type->kind == AstNode_TypeType || + field->type->kind == AstNode_PolyType) { is_generic = true; break; } diff --git a/src/string_set.cpp b/src/string_set.cpp index 9e44e1b1e..a6700839d 100644 --- a/src/string_set.cpp +++ b/src/string_set.cpp @@ -61,22 +61,6 @@ gb_internal StringSetFindResult string_set__find(StringSet *s, HashKey key) { return fr; } -gb_internal StringSetFindResult string_set__find_from_entry(StringSet *s, StringSetEntry *e) { - StringSetFindResult fr = {-1, -1, -1}; - if (s->hashes.count > 0) { - fr.hash_index = e->key.key % s->hashes.count; - fr.entry_index = s->hashes[fr.hash_index]; - while (fr.entry_index >= 0) { - if (&s->entries[fr.entry_index] == e) { - return fr; - } - fr.entry_prev = fr.entry_index; - fr.entry_index = s->entries[fr.entry_index].next; - } - } - return fr; -} - gb_internal b32 string_set__full(StringSet *s) { return 0.75f * s->hashes.count <= s->entries.count; }