mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Check for unneeded transmute with -vet-cast
This commit is contained in:
@@ -883,8 +883,8 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
|
||||
}
|
||||
defer _unix_free(path_ptr)
|
||||
|
||||
path_cstr := transmute(cstring)path_ptr
|
||||
path = strings.clone( string(path_cstr) )
|
||||
path_cstr := cast(cstring)path_ptr
|
||||
path = strings.clone(string(path_cstr))
|
||||
|
||||
return path, ERROR_NONE
|
||||
}
|
||||
|
||||
@@ -648,8 +648,8 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
|
||||
}
|
||||
defer _unix_free(path_ptr)
|
||||
|
||||
path_cstr := transmute(cstring)path_ptr
|
||||
path = strings.clone( string(path_cstr) )
|
||||
|
||||
path = strings.clone(string(cstring(path_ptr)))
|
||||
|
||||
return path, ERROR_NONE
|
||||
}
|
||||
|
||||
@@ -890,8 +890,7 @@ absolute_path_from_relative :: proc(rel: string) -> (path: string, err: Errno) {
|
||||
}
|
||||
defer _unix_free(path_ptr)
|
||||
|
||||
path_cstr := transmute(cstring)path_ptr
|
||||
path = strings.clone( string(path_cstr) )
|
||||
path = strings.clone(string(cstring(path_ptr)))
|
||||
|
||||
return path, ERROR_NONE
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user