Browse Source

Remove unneeded disabled warnings for MSVC

gingerBill 7 years ago
parent
commit
1cd453db14
4 changed files with 8 additions and 25 deletions
  1. 2 4
      build.bat
  2. 2 1
      src/exact_value.cpp
  3. 4 4
      src/parser.cpp
  4. 0 16
      src/string_set.cpp

+ 2 - 4
build.bat

@@ -18,9 +18,8 @@ set compiler_warnings= ^
 	-W4 -WX ^
 	-W4 -WX ^
 	-wd4100 -wd4101 -wd4127 -wd4189 ^
 	-wd4100 -wd4101 -wd4127 -wd4189 ^
 	-wd4201 -wd4204 -wd4244 ^
 	-wd4201 -wd4204 -wd4244 ^
-	-wd4306 ^
-	-wd4456 -wd4457 -wd4480 ^
-	-wd4505 -wd4512 -wd4550
+	-wd4456 -wd4457 ^
+	-wd4512
 
 
 set compiler_includes=
 set compiler_includes=
 set libs= ^
 set libs= ^
@@ -45,7 +44,6 @@ del *.ilk > NUL 2> NUL
 cl %compiler_settings% "src\main.cpp" ^
 cl %compiler_settings% "src\main.cpp" ^
 	/link %linker_settings% -OUT:%exe_name% ^
 	/link %linker_settings% -OUT:%exe_name% ^
 	&& odin run examples/demo.odin
 	&& odin run examples/demo.odin
-	rem && odin docs core/fmt.odin
 
 
 del *.obj > NUL 2> NUL
 del *.obj > NUL 2> NUL
 
 

+ 2 - 1
src/exact_value.cpp

@@ -46,9 +46,10 @@ struct ExactValue {
 gb_global ExactValue const empty_exact_value = {};
 gb_global ExactValue const empty_exact_value = {};
 
 
 HashKey hash_exact_value(ExactValue v) {
 HashKey hash_exact_value(ExactValue v) {
+	HashKey empty = {};
 	switch (v.kind) {
 	switch (v.kind) {
 	case ExactValue_Invalid:
 	case ExactValue_Invalid:
-		return HashKey{};
+		return empty;
 	case ExactValue_Bool:
 	case ExactValue_Bool:
 		return hash_integer(u64(v.value_bool));
 		return hash_integer(u64(v.value_bool));
 	case ExactValue_String:
 	case ExactValue_String:

+ 4 - 4
src/parser.cpp

@@ -2671,10 +2671,10 @@ AstNode *parse_proc_type(AstFile *f, Token proc_token) {
 
 
 	for_array(i, params->FieldList.list) {
 	for_array(i, params->FieldList.list) {
 		AstNode *param = params->FieldList.list[i];
 		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;
 				is_generic = true;
 				break;
 				break;
 			}
 			}

+ 0 - 16
src/string_set.cpp

@@ -61,22 +61,6 @@ gb_internal StringSetFindResult string_set__find(StringSet *s, HashKey key) {
 	return fr;
 	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) {
 gb_internal b32 string_set__full(StringSet *s) {
 	return 0.75f * s->hashes.count <= s->entries.count;
 	return 0.75f * s->hashes.count <= s->entries.count;
 }
 }