diff options
author | David 'Digit' Turner <digit@google.com> | 2014-10-31 23:11:27 +0100 |
---|---|---|
committer | David 'Digit' Turner <digit@google.com> | 2014-10-31 23:11:27 +0100 |
commit | 622970b4c1e68ce8b9470c9ecf79eacd2d94c2d7 (patch) | |
tree | 89c22ae19626a8ade3d2bfb675bae6cb1b986521 /opengl | |
parent | 5a7d8f2d70c2c84f0f84c2b8d0ac3fc119935259 (diff) | |
download | android_device_generic_goldfish-622970b4c1e68ce8b9470c9ecf79eacd2d94c2d7.tar.gz android_device_generic_goldfish-622970b4c1e68ce8b9470c9ecf79eacd2d94c2d7.tar.bz2 android_device_generic_goldfish-622970b4c1e68ce8b9470c9ecf79eacd2d94c2d7.zip |
opengl: Fix 64-bit build.
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
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/system/egl/egl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/opengl/system/egl/egl.cpp b/opengl/system/egl/egl.cpp index 7ff7429..1ad91ff 100644 --- a/opengl/system/egl/egl.cpp +++ b/opengl/system/egl/egl.cpp @@ -554,9 +554,9 @@ EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, 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; |