agauniyal / rang

A Minimal, Header only Modern c++ library for terminal goodies 💄✨
https://agauniyal.github.io/rang/
The Unlicense
1.5k stars 144 forks source link

[Fixing warning] cast between incompatible function types #111

Closed ConsoleTVs closed 5 years ago

ConsoleTVs commented 5 years ago
Logger/src/../include/rang.hpp:175:59: 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]

This is the only warning I get

λ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.2.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../gcc-8.2.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=ada,c,lto,c++,objc,obj-c++,fortran --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
Thread model: posix
gcc version 8.2.0 (Rev3, Built by MSYS2 project)

Is there a way to fix it quickly?

agauniyal commented 5 years ago

Hmm, is this related to this PR - https://github.com/agauniyal/rang/pull/102/files :thinking:

bissonex commented 5 years ago

Yes indeed. Do I need to fix something in the PR so that you could merge it?