From d854c5003cfdf96d763775a15b5910bb5c8c846b Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Tue, 1 Aug 2017 17:28:49 +0100 Subject: [PATCH] Fix minor errors for *nix --- src/build_settings.cpp | 2 +- src/ir.cpp | 2 +- src/ssa.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/build_settings.cpp b/src/build_settings.cpp index ce9256cd2..817737865 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -237,7 +237,7 @@ String path_to_fullpath(gbAllocator a, String s) { String path_to_fullpath(gbAllocator a, String s) { char *p; gb_mutex_lock(&string_buffer_mutex); - p = realpath(cast(char *)s.data, 0); + p = realpath(cast(char *)s.text, 0); gb_mutex_unlock(&string_buffer_mutex); if(p == nullptr) return make_string_c(""); return make_string_c(p); diff --git a/src/ir.cpp b/src/ir.cpp index 4bb48aa5e..0918eba11 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -3613,7 +3613,7 @@ String ir_mangle_name(irGen *s, String path, Entity *e) { cast(char *)new_name, max_len, "%.*s-%u.%.*s", cast(int)base_len, base, - file->id, + cast(u32)file->id, LIT(name)); } if (require_suffix_id) { diff --git a/src/ssa.cpp b/src/ssa.cpp index b3681b3ed..5862cca20 100644 --- a/src/ssa.cpp +++ b/src/ssa.cpp @@ -2556,7 +2556,7 @@ String ssa_mangle_name(ssaModule *m, String path, Entity *e) { cast(char *)new_name, max_len, "%.*s-%u.%.*s", cast(int)base_len, base, - file->id, + cast(u32)file->id, LIT(name)); if (is_overloaded) { char *str = cast(char *)new_name + new_name_len-1;