-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
When I used parameter -Wextra in g++, it gives a warning:
[Warning] cast between incompatible function types from 'FARPROC' {aka 'long long int ()()'} to 'WINBOOL ()(HANDLE, FILE_INFO_BY_HANDLE_CLASS, LPVOID, DWORD)' {aka 'int ()(void, _FILE_INFO_BY_HANDLE_CLASS, void*, long unsigned int)'} [-Wcast-function-type]
It's on line 175 in rang.hpp:
inline bool isMsysPty(int fd) noexcept
{
// Dynamic load for binary compability with old Windows
const auto ptrGetFileInformationByHandleEx
= reinterpret_cast<decltype(&GetFileInformationByHandleEx)>(
GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")),
"GetFileInformationByHandleEx"));
if (!ptrGetFileInformationByHandleEx) {
return false;
}All the parameters I used under Windows 10 1903, g++ 8.1.0:
g++ -std=c++2a -Wall -Wextra -Dlocal
Metadata
Metadata
Assignees
Labels
No labels