From 8590fd99475c83b14b09bb9ac2279a40a8968580 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 3 Jan 2022 18:15:51 +0900 Subject: [PATCH] Better way to suppress -Wint-to-pointer-cast --- main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cc b/main.cc index 51ec8ea4ff..38a41cdf99 100644 --- a/main.cc +++ b/main.cc @@ -19,7 +19,7 @@ std::string_view errno_string() { // always write an error message to a given buffer. if (std::is_same::value) - return (char *)(uintptr_t)strerror_r(errno, buf, sizeof(buf)); + return reinterpret_cast(strerror_r(errno, buf, sizeof(buf))); strerror_r(errno, buf, sizeof(buf)); return buf; }