diff --git a/opengl/libagl/Tokenizer.cpp b/opengl/libagl/Tokenizer.cpp index eac8d6d76..ac0a48cc0 100644 --- a/opengl/libagl/Tokenizer.cpp +++ b/opengl/libagl/Tokenizer.cpp @@ -163,9 +163,9 @@ void Tokenizer::dump() const { const run_t* ranges = mRanges.array(); const size_t c = mRanges.size(); - ALOGD("Tokenizer (%p, size = %u)\n", this, c); + ALOGD("Tokenizer (%p, size = %zu)\n", this, c); for (size_t i=0 ; i(__get_tls()[TLS_SLOT_OPENGL]); } #else extern pthread_key_t gGLKey; diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index bbbda766b..f925e7dc4 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -78,20 +78,20 @@ static T setError(GLint error, T returnValue) { pthread_key_create(&gEGLErrorKey, NULL); pthread_mutex_unlock(&gErrorKeyMutex); } - pthread_setspecific(gEGLErrorKey, (void*)error); + pthread_setspecific(gEGLErrorKey, (void*)(uintptr_t)error); return returnValue; } static GLint getError() { if (ggl_unlikely(gEGLErrorKey == -1)) return EGL_SUCCESS; - GLint error = (GLint)pthread_getspecific(gEGLErrorKey); + GLint error = (GLint)(uintptr_t)pthread_getspecific(gEGLErrorKey); if (error == 0) { // The TLS key has been created by another thread, but the value for // this thread has not been initialized. return EGL_SUCCESS; } - pthread_setspecific(gEGLErrorKey, (void*)EGL_SUCCESS); + pthread_setspecific(gEGLErrorKey, (void*)(uintptr_t)EGL_SUCCESS); return error; } @@ -1201,7 +1201,7 @@ static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { size_t numConfigs = NELEM(gConfigs); - int index = (int)config; + int index = (int)(uintptr_t)config; if (uint32_t(index) >= numConfigs) return setError(EGL_BAD_CONFIG, EGL_FALSE); @@ -1448,7 +1448,7 @@ EGLBoolean eglGetConfigs( EGLDisplay dpy, } GLint i; for (i=0 ; i