X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fegl%2Ffg_state_egl.c;h=59fc9c9d5be12069cb50ed95cfff8a95d7c915c1;hb=56cc35535901ef071bf8acab59ba176355ee3e0e;hp=f3b922af90c218c6a8adc7d31d0d7a3c6309d6fa;hpb=223d39f2318e1724283c50c346843199c81d2e7c;p=freeglut diff --git a/src/egl/fg_state_egl.c b/src/egl/fg_state_egl.c index f3b922a..59fc9c9 100644 --- a/src/egl/fg_state_egl.c +++ b/src/egl/fg_state_egl.c @@ -25,6 +25,7 @@ #include #include "fg_internal.h" +#include "egl/fg_window_egl.h" /* * Queries the GL context about some attributes @@ -32,7 +33,7 @@ static int fgPlatformGetConfig( int attribute ) { int returnValue = 0; - int result; /* Not checked */ + int result __fg_unused; /* Not checked */ if( fgStructure.CurrentWindow ) result = eglGetConfigAttrib( fgDisplay.pDisplay.egl.Display, @@ -122,7 +123,6 @@ int* fgPlatformGlutGetModeValues(GLenum eWhat, int *size) attribute_name = EGL_SAMPLES; EGLConfig* configArray; - EGLConfig* config; EGLint configArraySize = 0; /* Get number of available configs */ @@ -139,21 +139,19 @@ int* fgPlatformGlutGetModeValues(GLenum eWhat, int *size) /* We get results in ascending order */ { - int * temp_array; - int previous_value; + int previous_value = 0; int i; array = malloc(sizeof(int) * configArraySize); - previous_value = 0; for (i = 0; i < configArraySize; i++) { - int value; + int value = 0; eglGetConfigAttrib(fgDisplay.pDisplay.egl.Display, configArray[i], attribute_name, &value); if (value > previous_value) { previous_value = value; - temp_array[*size] = value; + array[*size] = value; (*size)++; } }