commit 11ff1deb2681e8e7859969ecc7f56f0bff9195e1
parent 4428499899b2548c3588d7693474b6b53e03aaff
Author: Jean Pierre Cimalando <jp-dev@inbox.ru>
Date: Sat, 8 May 2021 17:21:03 +0200
Eliminate function cast warnings with OpenGL
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/dgl/src/NanoVG.cpp b/dgl/src/NanoVG.cpp
@@ -89,6 +89,10 @@ DGL_EXT(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate)
static NVGcontext* nvgCreateGL_helper(int flags)
{
#if defined(DISTRHO_OS_WINDOWS)
+# ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wcast-function-type"
+# endif
static bool needsInit = true;
# define DGL_EXT(PROC, func) \
if (needsInit) func = (PROC) wglGetProcAddress ( #func ); \
@@ -123,6 +127,9 @@ DGL_EXT(PFNGLVERTEXATTRIBPOINTERPROC, glVertexAttribPointer)
DGL_EXT(PFNGLBLENDFUNCSEPARATEPROC, glBlendFuncSeparate)
# undef DGL_EXT
needsInit = false;
+# ifdef __GNUC__
+# pragma GCC diagnostic pop
+# endif
#endif
return nvgCreateGL(flags);
}