diff --git a/src/os/unix/unix.cpp b/src/os/unix/unix.cpp index 855fdb98c32..5fed998a1d5 100644 --- a/src/os/unix/unix.cpp +++ b/src/os/unix/unix.cpp @@ -196,7 +196,7 @@ static std::string convert_tofrom_fs(iconv_t convd, std::string_view name) iconv(convd, nullptr, nullptr, nullptr, nullptr); if (iconv(convd, &inbuf, &inlen, &outbuf, &outlen) == (size_t)(-1)) { Debug(misc, 0, "[iconv] error converting '{}'. Errno {}", name, errno); - return name; + return {}; } buf.resize(outbuf - buf.data()); @@ -215,8 +215,8 @@ std::string OTTD2FS(std::string_view name) const char *env = GetLocalCode(); convd = iconv_open(env, INTERNALCODE); if (convd == (iconv_t)(-1)) { - DEBUG(misc, 0, "[iconv] conversion from codeset '%s' to '%s' unsupported", INTERNALCODE, env); - return name; + Debug(misc, 0, "[iconv] conversion from codeset '{}' to '{}' unsupported", INTERNALCODE, env); + return {}; } } @@ -235,8 +235,8 @@ std::string FS2OTTD(std::string_view name) const char *env = GetLocalCode(); convd = iconv_open(INTERNALCODE, env); if (convd == (iconv_t)(-1)) { - DEBUG(misc, 0, "[iconv] conversion from codeset '%s' to '%s' unsupported", env, INTERNALCODE); - return name; + Debug(misc, 0, "[iconv] conversion from codeset '{}' to '{}' unsupported", env, INTERNALCODE); + return {}; } } @@ -311,7 +311,7 @@ void OSOpenBrowser(const std::string &url) args[1] = url.c_str(); args[2] = nullptr; execvp(args[0], const_cast(args)); - DEBUG(misc, 0, "Failed to open url: %s", url.c_str()); + Debug(misc, 0, "Failed to open url: {}", url); exit(0); } #endif /* __APPLE__ */