Browse Source

Fix (ignore) some compiler warnings

Signed-off-by: falkTX <falktx@falktx.com>
pull/292/head
falkTX 4 years ago
parent
commit
45d9a290bc
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 10 additions and 2 deletions
  1. +2
    -2
      dgl/src/NanoVG.cpp
  2. +8
    -0
      distrho/extra/LibraryUtils.hpp

+ 2
- 2
dgl/src/NanoVG.cpp View File

@@ -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


+ 8
- 0
distrho/extra/LibraryUtils.hpp View File

@@ -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


Loading…
Cancel
Save