native frameworks: 64-bit compile issues
- Fix format (print/scanf)
- Suppress unused argument warning messages (bonus)
Change-Id: I05c7724d2aba6da1e82a86000e11f3a8fef4e728
diff --git a/opengl/libagl/BufferObjectManager.h b/opengl/libagl/BufferObjectManager.h
index 9e9340a..6487faa 100644
--- a/opengl/libagl/BufferObjectManager.h
+++ b/opengl/libagl/BufferObjectManager.h
@@ -69,10 +69,10 @@
KeyedVector<GLuint, gl::buffer_t*> mBuffers;
};
-void EGLBufferObjectManager::incStrong(const void* id) const {
+void EGLBufferObjectManager::incStrong(const void* /*id*/) const {
android_atomic_inc(&mCount);
}
-void EGLBufferObjectManager::decStrong(const void* id) const {
+void EGLBufferObjectManager::decStrong(const void* /*id*/) const {
if (android_atomic_dec(&mCount) == 1) {
delete this;
}
diff --git a/opengl/libagl/array.cpp b/opengl/libagl/array.cpp
index 7fbe9b5..54207fa 100644
--- a/opengl/libagl/array.cpp
+++ b/opengl/libagl/array.cpp
@@ -397,9 +397,9 @@
}
}
+#if VC_CACHE_STATISTICS
void vertex_cache_t::dump_stats(GLenum mode)
{
-#if VC_CACHE_STATISTICS
nsecs_t time = systemTime(SYSTEM_TIME_THREAD) - startTime;
uint32_t hits = total - misses;
uint32_t prim_count;
@@ -418,8 +418,12 @@
total, hits, misses, (hits*100)/total,
prim_count, int(ns2us(time)), int(prim_count*float(seconds(1))/time),
float(misses) / prim_count);
-#endif
}
+#else
+void vertex_cache_t::dump_stats(GLenum /*mode*/)
+{
+}
+#endif
// ----------------------------------------------------------------------------
#if 0
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index f925e7d..1feac8b 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -206,7 +206,7 @@
return EGL_BUFFER_PRESERVED;
}
EGLBoolean egl_surface_t::setSwapRectangle(
- EGLint l, EGLint t, EGLint w, EGLint h)
+ EGLint /*l*/, EGLint /*t*/, EGLint /*w*/, EGLint /*h*/)
{
return EGL_FALSE;
}
@@ -793,7 +793,7 @@
static bool mask(GLint reqValue, GLint confValue) {
return (confValue & reqValue) == reqValue;
}
- static bool ignore(GLint reqValue, GLint confValue) {
+ static bool ignore(GLint /*reqValue*/, GLint /*confValue*/) {
return true;
}
};
@@ -1197,7 +1197,7 @@
return 0;
}
-static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
+static EGLBoolean getConfigAttrib(EGLDisplay /*dpy*/, EGLConfig config,
EGLint attribute, EGLint *value)
{
size_t numConfigs = NELEM(gConfigs);
@@ -1227,7 +1227,7 @@
}
static EGLSurface createWindowSurface(EGLDisplay dpy, EGLConfig config,
- NativeWindowType window, const EGLint *attrib_list)
+ NativeWindowType window, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1276,7 +1276,7 @@
}
static EGLSurface createPixmapSurface(EGLDisplay dpy, EGLConfig config,
- NativePixmapType pixmap, const EGLint *attrib_list)
+ NativePixmapType pixmap, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1655,7 +1655,7 @@
}
EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config,
- EGLContext share_list, const EGLint *attrib_list)
+ EGLContext /*share_list*/, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -1853,7 +1853,7 @@
return EGL_TRUE;
}
-EGLBoolean eglWaitNative(EGLint engine)
+EGLBoolean eglWaitNative(EGLint /*engine*/)
{
return EGL_TRUE;
}
@@ -1887,8 +1887,8 @@
return EGL_TRUE;
}
-EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface,
- NativePixmapType target)
+EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface /*surface*/,
+ NativePixmapType /*target*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1924,7 +1924,7 @@
// ----------------------------------------------------------------------------
EGLBoolean eglSurfaceAttrib(
- EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*attribute*/, EGLint /*value*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1933,7 +1933,7 @@
}
EGLBoolean eglBindTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1942,7 +1942,7 @@
}
EGLBoolean eglReleaseTexImage(
- EGLDisplay dpy, EGLSurface surface, EGLint buffer)
+ EGLDisplay dpy, EGLSurface /*surface*/, EGLint /*buffer*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1950,7 +1950,7 @@
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
}
-EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval)
+EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint /*interval*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_FALSE);
@@ -1987,8 +1987,8 @@
}
EGLSurface eglCreatePbufferFromClientBuffer(
- EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer,
- EGLConfig config, const EGLint *attrib_list)
+ EGLDisplay dpy, EGLenum /*buftype*/, EGLClientBuffer /*buffer*/,
+ EGLConfig /*config*/, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE)
return setError(EGL_BAD_DISPLAY, EGL_NO_SURFACE);
@@ -2011,21 +2011,21 @@
return NULL;
}
-EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface,
- const EGLint *attrib_list)
+EGLBoolean eglLockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/,
+ const EGLint* /*attrib_list*/)
{
EGLBoolean result = EGL_FALSE;
return result;
}
-EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface)
+EGLBoolean eglUnlockSurfaceKHR(EGLDisplay /*dpy*/, EGLSurface /*surface*/)
{
EGLBoolean result = EGL_FALSE;
return result;
}
EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target,
- EGLClientBuffer buffer, const EGLint *attrib_list)
+ EGLClientBuffer buffer, const EGLint* /*attrib_list*/)
{
if (egl_display_t::is_valid(dpy) == EGL_FALSE) {
return setError(EGL_BAD_DISPLAY, EGL_NO_IMAGE_KHR);
@@ -2106,7 +2106,7 @@
return FENCE_SYNC_HANDLE;
}
-EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
+EGLBoolean eglDestroySyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync)
{
if (sync != FENCE_SYNC_HANDLE) {
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
@@ -2115,8 +2115,8 @@
return EGL_TRUE;
}
-EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags,
- EGLTimeKHR timeout)
+EGLint eglClientWaitSyncKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync, EGLint /*flags*/,
+ EGLTimeKHR /*timeout*/)
{
if (sync != FENCE_SYNC_HANDLE) {
return setError(EGL_BAD_PARAMETER, EGL_FALSE);
@@ -2125,7 +2125,7 @@
return EGL_CONDITION_SATISFIED_KHR;
}
-EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync,
+EGLBoolean eglGetSyncAttribKHR(EGLDisplay /*dpy*/, EGLSyncKHR sync,
EGLint attribute, EGLint *value)
{
if (sync != FENCE_SYNC_HANDLE) {
diff --git a/opengl/libagl/light.cpp b/opengl/libagl/light.cpp
index fafec3f..479bf7e 100644
--- a/opengl/libagl/light.cpp
+++ b/opengl/libagl/light.cpp
@@ -105,7 +105,7 @@
c->lighting.shadeModel = GL_SMOOTH;
}
-void ogles_uninit_light(ogles_context_t* c)
+void ogles_uninit_light(ogles_context_t* /*c*/)
{
}
@@ -285,7 +285,7 @@
invalidate_lighting(c);
}
-void lightVertexNop(ogles_context_t*, vertex_t* v)
+void lightVertexNop(ogles_context_t*, vertex_t* /*v*/)
{
// we should never end-up here
}
diff --git a/opengl/libagl/primitives.cpp b/opengl/libagl/primitives.cpp
index 769ec40..57a798d 100644
--- a/opengl/libagl/primitives.cpp
+++ b/opengl/libagl/primitives.cpp
@@ -94,7 +94,7 @@
}
static void lightTriangleDarkFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
{
if (!(v2->flags & vertex_t::LIT)) {
v2->flags |= vertex_t::LIT;
@@ -118,7 +118,7 @@
}
static void lightTriangleFlat(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2)
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* v2)
{
if (!(v2->flags & vertex_t::LIT))
c->lighting.lightVertex(c, v2);
@@ -567,8 +567,8 @@
#pragma mark Triangle
#endif
-void primitive_nop_triangle(ogles_context_t* c,
- vertex_t* v0, vertex_t* v1, vertex_t* v2) {
+void primitive_nop_triangle(ogles_context_t* /*c*/,
+ vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/) {
}
void primitive_clip_triangle(ogles_context_t* c,
@@ -823,7 +823,7 @@
static inline
-bool cull_triangle(ogles_context_t* c, vertex_t* v0, vertex_t* v1, vertex_t* v2)
+bool cull_triangle(ogles_context_t* c, vertex_t* /*v0*/, vertex_t* /*v1*/, vertex_t* /*v2*/)
{
if (ggl_likely(c->cull.enable)) {
const GLenum winding = (c->lerp.area() > 0) ? GL_CW : GL_CCW;
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index 4bc653a..1d5def5 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -219,11 +219,11 @@
#endif
// These ones are super-easy, we're not supporting those features!
-void glSampleCoverage(GLclampf value, GLboolean invert) {
+void glSampleCoverage(GLclampf /*value*/, GLboolean /*invert*/) {
}
-void glSampleCoveragex(GLclampx value, GLboolean invert) {
+void glSampleCoveragex(GLclampx /*value*/, GLboolean /*invert*/) {
}
-void glStencilFunc(GLenum func, GLint ref, GLuint mask) {
+void glStencilFunc(GLenum func, GLint /*ref*/, GLuint /*mask*/) {
ogles_context_t* c = ogles_context_t::get();
if (func < GL_NEVER || func > GL_ALWAYS) {
ogles_error(c, GL_INVALID_ENUM);
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 08536df..9aa1c4f 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -1223,10 +1223,10 @@
// ----------------------------------------------------------------------------
void glCompressedTexSubImage2D(
- GLenum target, GLint level, GLint xoffset,
- GLint yoffset, GLsizei width, GLsizei height,
- GLenum format, GLsizei imageSize,
- const GLvoid *data)
+ GLenum /*target*/, GLint /*level*/, GLint /*xoffset*/,
+ GLint /*yoffset*/, GLsizei /*width*/, GLsizei /*height*/,
+ GLenum /*format*/, GLsizei /*imageSize*/,
+ const GLvoid* /*data*/)
{
ogles_context_t* c = ogles_context_t::get();
ogles_error(c, GL_INVALID_ENUM);
diff --git a/opengl/libagl/vertex.cpp b/opengl/libagl/vertex.cpp
index dad04d6..9aacdb3 100644
--- a/opengl/libagl/vertex.cpp
+++ b/opengl/libagl/vertex.cpp
@@ -41,7 +41,7 @@
c->currentNormal.z = 0x10000;
}
-void ogles_uninit_vertex(ogles_context_t* c)
+void ogles_uninit_vertex(ogles_context_t* /*c*/)
{
}
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 26240f1..7784ca6 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -313,7 +313,7 @@
}
EGLBoolean egl_display_t::makeCurrent(egl_context_t* c, egl_context_t* cur_c,
- EGLSurface draw, EGLSurface read, EGLContext ctx,
+ EGLSurface draw, EGLSurface read, EGLContext /*ctx*/,
EGLSurface impl_draw, EGLSurface impl_read, EGLContext impl_ctx)
{
EGLBoolean result;
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index 18ef6f9..893577b 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -53,34 +53,34 @@
}
void glColorPointerBounds(GLint size, GLenum type, GLsizei stride,
- const GLvoid *ptr, GLsizei count) {
+ const GLvoid *ptr, GLsizei /*count*/) {
glColorPointer(size, type, stride, ptr);
}
void glNormalPointerBounds(GLenum type, GLsizei stride,
- const GLvoid *pointer, GLsizei count) {
+ const GLvoid *pointer, GLsizei /*count*/) {
glNormalPointer(type, stride, pointer);
}
void glTexCoordPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glTexCoordPointer(size, type, stride, pointer);
}
void glVertexPointerBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glVertexPointer(size, type, stride, pointer);
}
void GL_APIENTRY glPointSizePointerOESBounds(GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glPointSizePointerOES(type, stride, pointer);
}
GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glMatrixIndexPointerOES(size, type, stride, pointer);
}
GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
- GLsizei stride, const GLvoid *pointer, GLsizei count) {
+ GLsizei stride, const GLvoid *pointer, GLsizei /*count*/) {
glWeightPointerOES(size, type, stride, pointer);
}
diff --git a/opengl/libs/GLES_trace/src/gltrace_egl.cpp b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
index 9d1682a..4f9b006 100644
--- a/opengl/libs/GLES_trace/src/gltrace_egl.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_egl.cpp
@@ -71,7 +71,7 @@
glContext->traceGLMessage(&glmessage);
}
-void GLTrace_eglSwapBuffers(void *dpy, void *draw) {
+void GLTrace_eglSwapBuffers(void* /*dpy*/, void* /*draw*/) {
GLMessage glmessage;
GLTraceContext *glContext = getGLTraceContext();