aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/opengl/host/libs/Translator/GLES_CM
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@android.com>2014-01-14 11:57:18 +0100
committerDavid 'Digit' Turner <digit@google.com>2014-01-18 16:56:31 +0100
commitb81cc7bbd7baa35042af6c6b71edcfe94004bbcd (patch)
tree409c961afb25f6768f38f76110dcf4466d39a4ca /emulator/opengl/host/libs/Translator/GLES_CM
parent4a218a8b31d712290dce83cc65fc0a529fb10823 (diff)
downloadsdk-b81cc7bbd7baa35042af6c6b71edcfe94004bbcd.zip
sdk-b81cc7bbd7baa35042af6c6b71edcfe94004bbcd.tar.gz
sdk-b81cc7bbd7baa35042af6c6b71edcfe94004bbcd.tar.bz2
emulator/opengl: Get rid of all compiler warnings (Linux).
This patch gets rid of all compiler warnings for the GPU emulation libraries when building on a Linux host. Note that GLcommon/GLutils.h now provides two new functions to perform 'safe' type casts between unsigned integers and pointers: SafePointerFromUInt() and SafeUIntFromPointer(). Change-Id: I01c48bbd72f925d70eb9831f57e15815e687121f
Diffstat (limited to 'emulator/opengl/host/libs/Translator/GLES_CM')
-rw-r--r--emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp b/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp
index 3ae271f..28ebca9 100644
--- a/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp
+++ b/emulator/opengl/host/libs/Translator/GLES_CM/GLEScmImp.cpp
@@ -582,7 +582,7 @@ GL_API void GL_APIENTRY glDrawElements( GLenum mode, GLsizei count, GLenum type
GLESConversionArrays tmpArrs;
if(ctx->isBindedBuffer(GL_ELEMENT_ARRAY_BUFFER)) { // if vbo is binded take the indices from the vbo
const unsigned char* buf = static_cast<unsigned char *>(ctx->getBindedBuffer(GL_ELEMENT_ARRAY_BUFFER));
- indices = buf+reinterpret_cast<uintptr_t>(elementsIndices);
+ indices = buf + SafeUIntFromPointer(elementsIndices);
}
ctx->setupArraysPointers(tmpArrs,0,count,type,indices,false);
@@ -994,9 +994,9 @@ GL_API void GL_APIENTRY glGetPointerv( GLenum pname, void **params) {
if(p) {
if(p->isVBO())
{
- *params = (void*)(p->getBufferOffset());
+ *params = SafePointerFromUInt(p->getBufferOffset());
}else{
- *params = const_cast<void *>( p->getArrayData());
+ *params = const_cast<void *>(p->getArrayData());
}
} else {
ctx->setGLerror(GL_INVALID_ENUM);
@@ -1652,7 +1652,7 @@ GL_API void GL_APIENTRY glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOE
{
GET_CTX();
SET_ERROR_IF(!GLEScmValidate::textureTargetLimited(target),GL_INVALID_ENUM);
- unsigned int imagehndl = ToTargetCompatibleHandle((uintptr_t)image);
+ unsigned int imagehndl = SafeUIntFromPointer(image);
EglImage *img = s_eglIface->eglAttachEGLImage(imagehndl);
if (img) {
// Create the texture object in the underlying EGL implementation,
@@ -1688,7 +1688,7 @@ GL_API void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES(GLenum target, GL
{
GET_CTX();
SET_ERROR_IF(target != GL_RENDERBUFFER_OES,GL_INVALID_ENUM);
- unsigned int imagehndl = ToTargetCompatibleHandle((uintptr_t)image);
+ unsigned int imagehndl = SafeUIntFromPointer(image);
EglImage *img = s_eglIface->eglAttachEGLImage(imagehndl);
SET_ERROR_IF(!img,GL_INVALID_VALUE);
SET_ERROR_IF(!ctx->shareGroup().Ptr(),GL_INVALID_OPERATION);