diff --git a/support/src/utils/file.cpp b/support/src/utils/file.cpp index 3851fdda..b7ec7160 100644 --- a/support/src/utils/file.cpp +++ b/support/src/utils/file.cpp @@ -55,7 +55,7 @@ auto change_to_process_directory() -> bool { std::string path; path.resize(PATH_MAX + 1); #if defined(__APPLE__) - proc_pidpath(getpid(), reinterpret_cast(path.data()), + auto res =proc_pidpath(getpid(), reinterpret_cast(path.data()), static_cast(path.size())); #else // !defined(__APPLE__) auto res = readlink("/proc/self/exe", path.data(), path.size()); @@ -69,7 +69,7 @@ auto change_to_process_directory() -> bool { } #endif // defined(__APPLE__) path = utils::path::get_parent_path(path); - auto res = chdir(path.c_str()); + res = chdir(path.c_str()); if (res != 0) { throw utils::error::create_exception( function_name, { diff --git a/support/src/utils/unix.cpp b/support/src/utils/unix.cpp index 8d4c4683..7d647690 100644 --- a/support/src/utils/unix.cpp +++ b/support/src/utils/unix.cpp @@ -31,6 +31,7 @@ auto convert_to_uint64(pthread_t thread) -> std::uint64_t { #else // defined(__APPLE__) return static_cast(thread); #endif // defined(__APPLE__) +} auto get_last_error_code() -> int { return errno; }