Demos (master): drawtex: fixed compiler warnings related to use of eglGetProcAddress

Tapani Pälli tpalli at kemper.freedesktop.org
Mon May 12 09:40:54 UTC 2014


Module: Demos
Branch: master
Commit: 6ad8820c457845300806a2f9469599460ca96af9
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=6ad8820c457845300806a2f9469599460ca96af9

Author: Stefan Dirsch <sndirsch at suse.de>
Date:   Thu May  8 11:48:44 2014 +0200

drawtex: fixed compiler warnings related to use of eglGetProcAddress

Add proper <EGL/egl.h> include and cast in order to fix compiler
warnings related to the use of eglGetProcAddress.

Reviewed-By: Tapani Pälli <tapani.palli at intel.com>

---

 src/egl/opengles1/drawtex.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/egl/opengles1/drawtex.c b/src/egl/opengles1/drawtex.c
index 1ba8ac7..dc1de13 100644
--- a/src/egl/opengles1/drawtex.c
+++ b/src/egl/opengles1/drawtex.c
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <GLES/gl.h>
 #include <GLES/glext.h>
+#include <EGL/egl.h>
 
 #include "eglut.h"
 
@@ -129,7 +130,7 @@ init(void)
       exit(1);
    }
 
-   glDrawTexfOES_func = eglGetProcAddress("glDrawTexfOES");
+   glDrawTexfOES_func = (PFNGLDRAWTEXFOESPROC) eglGetProcAddress("glDrawTexfOES");
 
    if (!glDrawTexfOES_func) {
       fprintf(stderr, "Sorry, failed to resolve glDrawTexfOES function\n");




More information about the mesa-commit mailing list