diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp b/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp index 2cc836d77..a421db994 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp +++ b/tools/emulator/opengl/host/libs/Translator/EGL/EglX11Api.cpp @@ -87,7 +87,7 @@ EglConfig* pixelFormatToConfig(EGLNativeDisplayType dpy,int renderableType,EGLNa int bSize,red,green,blue,alpha,depth,stencil; int supportedSurfaces,visualType,visualId; int caveat,transparentType,samples; - int tRed,tGreen,tBlue; + int tRed=0,tGreen=0,tBlue=0; int pMaxWidth,pMaxHeight,pMaxPixels; int tmp; int configId,level,renderable; diff --git a/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.h b/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.h index 9ee55bf6a..ffc6e5f0f 100644 --- a/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.h +++ b/tools/emulator/opengl/host/libs/Translator/EGL/ThreadInfo.h @@ -22,7 +22,7 @@ class EglDisplay; class GLEScontext; struct ThreadInfo { - ThreadInfo():glesContext(NULL),objManager(NULL){} + ThreadInfo():eglDisplay(NULL),glesContext(NULL),objManager(NULL){} void updateInfo(ContextPtr eglctx, EglDisplay* dpy, diff --git a/tools/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp b/tools/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp index eb8531171..c923bfc8a 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp +++ b/tools/emulator/opengl/host/libs/Translator/GLcommon/FramebufferData.cpp @@ -36,6 +36,7 @@ FramebufferData::FramebufferData(GLuint name):m_dirty(false) { m_attachPoints[i].target = 0; m_attachPoints[i].name = 0; m_attachPoints[i].obj = ObjectDataPtr(NULL); + m_attachPoints[i].owned = false; } } diff --git a/tools/emulator/opengl/host/libs/Translator/GLcommon/TextureUtils.cpp b/tools/emulator/opengl/host/libs/Translator/GLcommon/TextureUtils.cpp index 3e8fafcd8..81152f6a3 100644 --- a/tools/emulator/opengl/host/libs/Translator/GLcommon/TextureUtils.cpp +++ b/tools/emulator/opengl/host/libs/Translator/GLcommon/TextureUtils.cpp @@ -97,7 +97,7 @@ void doCompressedTexImage2D(GLEScontext * ctx, GLenum target, GLint level, glTexImage2DPtr(target,i,uncompressedFrmt,tmpWidth,tmpHeight,border,uncompressedFrmt,GL_UNSIGNED_BYTE,uncompressed); tmpWidth/=2; tmpHeight/=2; - delete uncompressed; + delete[] uncompressed; } } break; diff --git a/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp b/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp index 29b4d6426..4622161b9 100644 --- a/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp +++ b/tools/emulator/opengl/host/libs/libOpenglRender/FBConfig.cpp @@ -183,7 +183,7 @@ InitConfigStatus FBConfig::initConfigList(FrameBuffer *fb) } s_numConfigs = j; - delete configs; + delete[] configs; return ret; } @@ -303,6 +303,7 @@ FBConfig::FBConfig(EGLDisplay p_eglDpy, EGLConfig p_eglCfg) m_eglConfig = p_eglCfg; m_attribValues = new GLint[s_numConfigAttribs]; for (int i=0; i 0) && (m_readPtr > m_buf)) { - memcpy(m_buf, m_readPtr, m_validData); + memmove(m_buf, m_readPtr, m_validData); } // get fresh data into the buffer; size_t len = m_size - m_validData;