Skip to content

Commit

Permalink
One more compiler warning fix
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <[email protected]>
  • Loading branch information
falkTX committed Aug 19, 2021
1 parent b7e70ec commit cc7a9fc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/modules/water/files/File.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,14 @@ bool File::createSymbolicLink (const File& linkFileToCreate, bool overwriteExist
#ifdef CARLA_OS_WIN
typedef BOOLEAN (WINAPI* PFUNC)(LPCTSTR, LPCTSTR, DWORD);

# if defined(__GNUC__) && (__GNUC__ >= 9)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wcast-function-type"
# endif
const PFUNC pfn = (PFUNC)GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "CreateSymbolicLinkA");
# if defined(__GNUC__) && (__GNUC__ >= 9)
# pragma GCC diagnostic pop
# endif
CARLA_SAFE_ASSERT_RETURN(pfn != nullptr, false);

return pfn(linkFileToCreate.getFullPathName().toRawUTF8(), fullPath.toRawUTF8(),
Expand Down

0 comments on commit cc7a9fc

Please sign in to comment.