A previous patch broke the 64-bit with the following error message:
device/generic/goldfish/opengl/system/egl/egl.cpp: In function 'EGLBoolean eglGetConfigs(EGLDisplay, void**, EGLint, EGLint*)':
device/generic/goldfish/opengl/system/egl/egl.cpp:559:33: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
*configs++ = (EGLConfig)i;
This was due to the fact that the type of |i| went from uintptr_t to int.
This patch fixes the issue by casting i to (EGLConfig)(uintptr_t)i.
Change-Id: I3158c91d63b13eff3f8e8babb1faba8b58dc7373
return EGL_TRUE;
}
- EGLint i=0;
- for (i=0 ; i<numConfigs && i<config_size ; i++) {
- *configs++ = (EGLConfig)i;
+ EGLint i;
+ for (i = 0 ; i < numConfigs && i < config_size ; i++) {
+ *configs++ = (EGLConfig)(uintptr_t)i;
}
*num_config = i;
return EGL_TRUE;