aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-12-20 20:21:05 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-01-05 20:36:37 +0300
commit5cd9e0c25e39ff1449e38a9c74e131e7359e7183 (patch)
treeccb52ae13a47e9e953e01becb091283eba946410
parent6b482c6d405f1468eaac3059b3353eb0805cca9c (diff)
Fix 'cast between incompatible function types' MinGW GCC warning
-rw-r--r--libbutl/fdstream.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbutl/fdstream.cxx b/libbutl/fdstream.cxx
index de91724..1b29279 100644
--- a/libbutl/fdstream.cxx
+++ b/libbutl/fdstream.cxx
@@ -72,6 +72,9 @@ import butl.filesystem;
import butl.small_vector;
#endif
+import butl.utility; // throw_*_ios_failure(), function_cast()
+#else
+#include <libbutl/utility.mxx>
#endif
using namespace std;
@@ -1723,8 +1726,8 @@ namespace butl
using func = BOOL (*) (HANDLE, file_info, LPVOID, DWORD);
- func f (reinterpret_cast<func> (
- GetProcAddress (kh, "GetFileInformationByHandleEx")));
+ func f (function_cast<func> (
+ GetProcAddress (kh, "GetFileInformationByHandleEx")));
if (f == nullptr)
return false;