diff --git a/shared/OpenglCodecCommon/FixedBuffer.h b/shared/OpenglCodecCommon/FixedBuffer.h index 30b9a80eead29101052a975abae5be1740b85099..702639647e8110e9a870c5c70a41157a29f3974e 100644 --- a/shared/OpenglCodecCommon/FixedBuffer.h +++ b/shared/OpenglCodecCommon/FixedBuffer.h @@ -20,7 +20,7 @@ class FixedBuffer { public: FixedBuffer(size_t initialSize = 0) { m_buffer = NULL; - m_bufferLen = 0; + m_bufferLen = initialSize; alloc(m_bufferLen); } diff --git a/system/GLESv1/gl.cpp b/system/GLESv1/gl.cpp index c684d147a1464bbd98fb32004a1c73571bf8667f..a7950eb1e0e8f9e74724c0b903e58e574f4ece5e 100644 --- a/system/GLESv1/gl.cpp +++ b/system/GLESv1/gl.cpp @@ -50,6 +50,8 @@ static EGLClient_glesInterface * s_gl = NULL; //GL extensions void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES image) { + (void)self; + DBG("glEGLImageTargetTexture2DOES v1 target=%#x image=%p", target, image); //TODO: check error - we don't have a way to set gl error android_native_buffer_t* native_buffer = (android_native_buffer_t*)image; @@ -75,6 +77,9 @@ void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES imag void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES image) { + (void)self; + (void)target; + DBG("glEGLImageTargetRenderbufferStorageOES v1 target=%#x image=%p", target, image); //TODO: check error - we don't have a way to set gl error @@ -113,6 +118,8 @@ void finish() const GLubyte *my_glGetString (void *self, GLenum name) { + (void)self; + if (s_egl) { return (const GLubyte*)s_egl->getGLString(name); } diff --git a/system/GLESv1_enc/GLEncoder.cpp b/system/GLESv1_enc/GLEncoder.cpp index ae00ca70d854510f0ce9e818160c0e00747b0761..0fe1d8e8a8e69f0f19a89f14cb3eedbe0dc09324 100644 --- a/system/GLESv1_enc/GLEncoder.cpp +++ b/system/GLESv1_enc/GLEncoder.cpp @@ -235,6 +235,8 @@ void GLEncoder::s_glFlush(void *self) const GLubyte *GLEncoder::s_glGetString(void *self, GLenum name) { + (void)self; + GLubyte *retval = (GLubyte *) ""; switch(name) { case GL_VENDOR: diff --git a/system/GLESv1_enc/gl_client_context.h b/system/GLESv1_enc/gl_client_context.h index aa058ece327a4601f44ad15ecb66a81186b670be..35fb27a0e271b9986759b2ad0299464f60cd3502 100644 --- a/system/GLESv1_enc/gl_client_context.h +++ b/system/GLESv1_enc/gl_client_context.h @@ -304,7 +304,7 @@ struct gl_client_context_t { typedef gl_client_context_t *CONTEXT_ACCESSOR_TYPE(void); static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); - virtual void setError(unsigned int error){}; + virtual void setError(unsigned int error){ (void)error; }; virtual unsigned int getError(){ return 0; }; }; diff --git a/system/GLESv2/gl2.cpp b/system/GLESv2/gl2.cpp index e6b4d0bf6e36170d86a15858d4c69a14dcb1b7fc..e54577957b3f25d8f7c3452214afecd508df8285 100644 --- a/system/GLESv2/gl2.cpp +++ b/system/GLESv2/gl2.cpp @@ -50,6 +50,9 @@ static EGLClient_glesInterface * s_gl = NULL; //GL extensions void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES image) { + (void)self; + (void)target; + DBG("glEGLImageTargetTexture2DOES v2 target=%#x img=%p\n", target, image); //TODO: check error - we don't have a way to set gl error android_native_buffer_t* native_buffer = (android_native_buffer_t*)image; @@ -74,6 +77,9 @@ void glEGLImageTargetTexture2DOES(void * self, GLenum target, GLeglImageOES imag void glEGLImageTargetRenderbufferStorageOES(void *self, GLenum target, GLeglImageOES image) { + (void)self; + (void)target; + DBG("glEGLImageTargetRenderbufferStorageOES v2 image=%p\n", image); //TODO: check error - we don't have a way to set gl error android_native_buffer_t* native_buffer = (android_native_buffer_t*)image; @@ -110,6 +116,8 @@ void finish() const GLubyte *my_glGetString (void *self, GLenum name) { + (void)self; + if (s_egl) { return (const GLubyte*)s_egl->getGLString(name); } diff --git a/system/GLESv2_enc/GL2Encoder.cpp b/system/GLESv2_enc/GL2Encoder.cpp index 3b2100e131ebb57aedddfd687e68f1c6262c9cf7..94905714067e78d6cbc64cc09fd3f8608bf732b3 100644 --- a/system/GLESv2_enc/GL2Encoder.cpp +++ b/system/GLESv2_enc/GL2Encoder.cpp @@ -150,6 +150,8 @@ void GL2Encoder::s_glFlush(void *self) const GLubyte *GL2Encoder::s_glGetString(void *self, GLenum name) { + (void)self; + GLubyte *retval = (GLubyte *) ""; switch(name) { case GL_VENDOR: @@ -403,6 +405,8 @@ void GL2Encoder::s_glGetVertexAttribPointerv(void *self, GLuint index, GLenum pn GL2Encoder *ctx = (GL2Encoder *)self; if (ctx->m_state == NULL) return; + (void)pname; + const GLClientState::VertexAttribState *va_state = ctx->m_state->getState(index); if (va_state != NULL) { *pointer = va_state->data; diff --git a/system/GLESv2_enc/gl2_client_context.h b/system/GLESv2_enc/gl2_client_context.h index a92f4bb046eb87db34fb2ec5674c574fd4d3e1e6..87d62d5f2503dee33a09d9399b599f0336e287f1 100644 --- a/system/GLESv2_enc/gl2_client_context.h +++ b/system/GLESv2_enc/gl2_client_context.h @@ -221,7 +221,7 @@ struct gl2_client_context_t { typedef gl2_client_context_t *CONTEXT_ACCESSOR_TYPE(void); static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); - virtual void setError(unsigned int error){}; + virtual void setError(unsigned int error){ (void)error; }; virtual unsigned int getError(){ return 0; }; }; diff --git a/system/OpenglSystemCommon/ThreadInfo.cpp b/system/OpenglSystemCommon/ThreadInfo.cpp index f9c8521db5883f5e23051bc2ba61e90021077b5a..04ce50892f299e1b9f73698137291be814728097 100644 --- a/system/OpenglSystemCommon/ThreadInfo.cpp +++ b/system/OpenglSystemCommon/ThreadInfo.cpp @@ -24,7 +24,7 @@ static void tlsDestruct(void *ptr) EGLThreadInfo *ti = (EGLThreadInfo *)ptr; delete ti->hostConn; delete ti; - ((intptr_t *)__get_tls())[TLS_SLOT_OPENGL] = NULL; + ((void **)__get_tls())[TLS_SLOT_OPENGL] = NULL; } } diff --git a/system/egl/egl.cpp b/system/egl/egl.cpp index daa52de4c309cb76c5b53dd05e604e7a84f8f356..7ff7429a673b54afefc3d2af6c830f0467fb02ca 100644 --- a/system/egl/egl.cpp +++ b/system/egl/egl.cpp @@ -336,7 +336,7 @@ struct egl_pbuffer_surface_t : public egl_surface_t { virtual ~egl_pbuffer_surface_t(); - virtual void setSwapInterval(int interval) {} + virtual void setSwapInterval(int interval) { (void)interval; } virtual EGLBoolean swapBuffers() { return EGL_TRUE; } uint32_t getRcColorBuffer() { return rcColorBuffer; } @@ -542,7 +542,7 @@ const char* eglQueryString(EGLDisplay dpy, EGLint name) EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config) { - VALIDATE_DISPLAY_INIT(dpy, NULL); + VALIDATE_DISPLAY_INIT(dpy, EGL_FALSE); if(!num_config) { RETURN_ERROR(EGL_FALSE,EGL_BAD_PARAMETER); @@ -554,7 +554,7 @@ EGLBoolean eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, EGLint config_size, return EGL_TRUE; } - uintptr_t i=0; + EGLint i=0; for (i=0 ; i<numConfigs && i<config_size ; i++) { *configs++ = (EGLConfig)i; } @@ -593,7 +593,7 @@ EGLBoolean eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value) { - VALIDATE_DISPLAY_INIT(dpy, NULL); + VALIDATE_DISPLAY_INIT(dpy, EGL_FALSE); VALIDATE_CONFIG(config, EGL_FALSE); if (s_display.getConfigAttrib(config, attribute, value)) @@ -608,6 +608,8 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list) { + (void)attrib_list; + VALIDATE_DISPLAY_INIT(dpy, NULL); VALIDATE_CONFIG(config, EGL_FALSE); if (win == 0) { @@ -699,6 +701,10 @@ EGLSurface eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePix // to s/w rendering -or- let the host render to a buffer that will be // copied back to guest at some sync point. None of those methods not // implemented and pixmaps are not used with OpenGL anyway ... + (void)dpy; + (void)config; + (void)pixmap; + (void)attrib_list; return EGL_NO_SURFACE; } @@ -783,6 +789,11 @@ EGLBoolean eglReleaseThread() EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list) { //TODO + (void)dpy; + (void)buftype; + (void)buffer; + (void)config; + (void)attrib_list; ALOGW("%s not implemented", __FUNCTION__); return 0; } @@ -790,6 +801,10 @@ EGLSurface eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGL EGLBoolean eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) { //TODO + (void)dpy; + (void)surface; + (void)attribute; + (void)value; ALOGW("%s not implemented", __FUNCTION__); return 0; } @@ -828,6 +843,9 @@ EGLBoolean eglBindTexImage(EGLDisplay dpy, EGLSurface eglSurface, EGLint buffer) EGLBoolean eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer) { //TODO + (void)dpy; + (void)surface; + (void)buffer; ALOGW("%s not implemented", __FUNCTION__); return 0; } @@ -1088,6 +1106,7 @@ EGLBoolean eglWaitGL() EGLBoolean eglWaitNative(EGLint engine) { + (void)engine; return EGL_TRUE; } @@ -1113,23 +1132,33 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface eglSurface) EGLBoolean eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target) { //TODO :later + (void)dpy; + (void)surface; + (void)target; return 0; } EGLBoolean eglLockSurfaceKHR(EGLDisplay display, EGLSurface surface, const EGLint *attrib_list) { //TODO later + (void)display; + (void)surface; + (void)attrib_list; return 0; } EGLBoolean eglUnlockSurfaceKHR(EGLDisplay display, EGLSurface surface) { //TODO later + (void)display; + (void)surface; return 0; } EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list) { + (void)attrib_list; + VALIDATE_DISPLAY_INIT(dpy, EGL_NO_IMAGE_KHR); if (ctx != EGL_NO_CONTEXT) { setErrorReturn(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR); @@ -1212,6 +1241,8 @@ EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) { + (void)dpy; + if (sync != FENCE_SYNC_HANDLE) { setErrorReturn(EGL_BAD_PARAMETER, EGL_FALSE); } @@ -1222,6 +1253,10 @@ EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) { + (void)dpy; + (void)flags; + (void)timeout; + if (sync != FENCE_SYNC_HANDLE) { setErrorReturn(EGL_BAD_PARAMETER, EGL_FALSE); } @@ -1232,6 +1267,8 @@ EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value) { + (void)dpy; + if (sync != FENCE_SYNC_HANDLE) { setErrorReturn(EGL_BAD_PARAMETER, EGL_FALSE); } diff --git a/system/gralloc/gralloc.cpp b/system/gralloc/gralloc.cpp index ac812c15df3eab71f490f16f3d0154ca1b6d027f..a6f7d91791848d93c97a2007cdff9d40f634ad4f 100644 --- a/system/gralloc/gralloc.cpp +++ b/system/gralloc/gralloc.cpp @@ -427,6 +427,8 @@ static int gralloc_device_close(struct hw_device_t *dev) static int fb_compositionComplete(struct framebuffer_device_t* dev) { + (void)dev; + return 0; } @@ -465,6 +467,11 @@ static int fb_setUpdateRect(struct framebuffer_device_t* dev, { fb_device_t *fbdev = (fb_device_t *)dev; + (void)l; + (void)t; + (void)w; + (void)h; + if (!fbdev) { return -EINVAL; } diff --git a/system/renderControl_enc/renderControl_client_context.h b/system/renderControl_enc/renderControl_client_context.h index 6b0d82f6889f975a8807752afa4466566a8ebe51..4c71d898f7209868bf32a671106f6d09a8cec15f 100644 --- a/system/renderControl_enc/renderControl_client_context.h +++ b/system/renderControl_enc/renderControl_client_context.h @@ -39,7 +39,7 @@ struct renderControl_client_context_t { typedef renderControl_client_context_t *CONTEXT_ACCESSOR_TYPE(void); static void setContextAccessor(CONTEXT_ACCESSOR_TYPE *f); int initDispatchByName( void *(*getProc)(const char *name, void *userData), void *userData); - virtual void setError(unsigned int error){}; + virtual void setError(unsigned int error){ (void)error; }; virtual unsigned int getError(){ return 0; }; };