From 5cd9e0c25e39ff1449e38a9c74e131e7359e7183 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 20 Dec 2019 20:21:05 +0300 Subject: Fix 'cast between incompatible function types' MinGW GCC warning --- libbutl/fdstream.cxx | 7 +++++-- 1 file 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 #endif using namespace std; @@ -1723,8 +1726,8 @@ namespace butl using func = BOOL (*) (HANDLE, file_info, LPVOID, DWORD); - func f (reinterpret_cast ( - GetProcAddress (kh, "GetFileInformationByHandleEx"))); + func f (function_cast ( + GetProcAddress (kh, "GetFileInformationByHandleEx"))); if (f == nullptr) return false; -- cgit v1.1