DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit 45d9a290bc5486e317ffe60f4af2ced3ed66d9c7
parent 84437dfbe44a78f7cd945cfefb6093dc0ead5c7e
Author: falkTX <falktx@falktx.com>
Date:   Sun, 13 Jun 2021 21:28:04 +0100

Fix (ignore) some compiler warnings

Signed-off-by: falkTX <falktx@falktx.com>

Diffstat:
Mdgl/src/NanoVG.cpp | 4++--
Mdistrho/extra/LibraryUtils.hpp | 8++++++++
2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp @@ -89,7 +89,7 @@ DGL_EXT(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate) static NVGcontext* nvgCreateGL_helper(int flags) { #if defined(DISTRHO_OS_WINDOWS) -# if defined(__GNUC__) && (__GNUC__ >= 10) +# if defined(__GNUC__) && (__GNUC__ >= 9) # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wcast-function-type" # endif @@ -127,7 +127,7 @@ DGL_EXT(PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer) DGL_EXT(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate) # undef DGL_EXT needsInit = false; -# if defined(__GNUC__) && (__GNUC__ >= 10) +# if defined(__GNUC__) && (__GNUC__ >= 9) # pragma GCC diagnostic pop # endif #endif diff --git a/distrho/extra/LibraryUtils.hpp b/distrho/extra/LibraryUtils.hpp @@ -20,6 +20,7 @@ #include "../DistrhoUtils.hpp" #ifdef DISTRHO_OS_WINDOWS +# include <winsock2.h> # include <windows.h> typedef HMODULE lib_t; #else @@ -79,7 +80,14 @@ Func lib_symbol(const lib_t lib, const char* const symbol) noexcept try { #ifdef DISTRHO_OS_WINDOWS +# if defined(__GNUC__) && (__GNUC__ >= 9) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wcast-function-type" +# endif return (Func)::GetProcAddress(lib, symbol); +# if defined(__GNUC__) && (__GNUC__ >= 9) +# pragma GCC diagnostic pop +# endif #else return (Func)(uintptr_t)::dlsym(lib, symbol); #endif