Browse Source

Keep `-vet` happy

Feoramund 1 year ago
parent
commit
b3caae6db4
3 changed files with 4 additions and 4 deletions
  1. 2 2
      core/encoding/uuid/generation.odin
  2. 1 1
      core/flags/internal_rtti.odin
  3. 1 1
      core/os/os_darwin.odin

+ 2 - 2
core/encoding/uuid/generation.odin

@@ -106,8 +106,8 @@ generate_v6 :: proc(clock_seq: Maybe(u16) = nil, node: Maybe([6]u8) = nil, times
 		temporary: [2]u8
 		temporary: [2]u8
 		bytes_generated := rand.read(temporary[:])
 		bytes_generated := rand.read(temporary[:])
 		assert(bytes_generated == 2, "RNG failed to generate 2 bytes for UUID v1.")
 		assert(bytes_generated == 2, "RNG failed to generate 2 bytes for UUID v1.")
-		result[8] |= cast(u8)temporary[0] & 0x3F
-		result[9]  = cast(u8)temporary[1]
+		result[8] |= temporary[0] & 0x3F
+		result[9]  = temporary[1]
 	}
 	}
 
 
 	if realized_node, ok := node.?; ok {
 	if realized_node, ok := node.?; ok {

+ 1 - 1
core/flags/internal_rtti.odin

@@ -184,7 +184,7 @@ parse_and_set_pointer_by_base_type :: proc(ptr: rawptr, str: string, type_info:
 			case 16:  (cast(^u16)  ptr)^ = cast(u16)  value
 			case 16:  (cast(^u16)  ptr)^ = cast(u16)  value
 			case 32:  (cast(^u32)  ptr)^ = cast(u32)  value
 			case 32:  (cast(^u32)  ptr)^ = cast(u32)  value
 			case 64:  (cast(^u64)  ptr)^ = cast(u64)  value
 			case 64:  (cast(^u64)  ptr)^ = cast(u64)  value
-			case 128: (cast(^u128) ptr)^ = cast(u128) value
+			case 128: (cast(^u128) ptr)^ =            value
 			}
 			}
 		}
 		}
 
 

+ 1 - 1
core/os/os_darwin.odin

@@ -555,7 +555,7 @@ open :: proc(path: string, flags: int = O_RDWR, mode: int = 0) -> (Handle, Errno
 		err := fchmod(handle, cast(u16)mode)
 		err := fchmod(handle, cast(u16)mode)
 		if err != 0 {
 		if err != 0 {
 			_unix_close(handle)
 			_unix_close(handle)
-			return INVALID_HANDLE, cast(Errno)err
+			return INVALID_HANDLE, err
 		}
 		}
 	}
 	}