diff options
author | Chih-Hung Hsieh <chh@google.com> | 2017-11-07 15:14:48 -0800 |
---|---|---|
committer | Chih-Hung Hsieh <chh@google.com> | 2017-11-07 15:14:48 -0800 |
commit | 11e77b524ecfb10e3d79c1481d560e9d6f6fcda5 (patch) | |
tree | 376bffc5f47bd67260f12fc4f37b2158321e6675 /opengl | |
parent | 5be02d66ed26c2938cf179ed625057d225ab38c8 (diff) | |
download | native-11e77b524ecfb10e3d79c1481d560e9d6f6fcda5.tar.gz |
Fix trivial compiler warnings
Test: Compile & executed many of the tests on Marlin
Change-Id: I2d88922c5dcc88de0394c5bfade02ca1dd9d7b60
Merged-In: I2d88922c5dcc88de0394c5bfade02ca1dd9d7b60
(cherry picked from commit 9c938487732de50adb46a2699ce930195c873ea1)
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/tests/angeles/demo.c | 4 | ||||
-rw-r--r-- | opengl/tests/fillrate/fillrate.cpp | 4 | ||||
-rw-r--r-- | opengl/tests/finish/finish.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/gl2_jni/jni/gl_code.cpp | 4 | ||||
-rw-r--r-- | opengl/tests/gl_basic/gl_basic.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/gl_jni/jni/gl_code.cpp | 6 | ||||
-rw-r--r-- | opengl/tests/gl_perf/gl2_perf.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/gl_perfapp/jni/gl_code.cpp | 4 | ||||
-rw-r--r-- | opengl/tests/gl_yuvtex/gl_yuvtex.cpp | 4 | ||||
-rw-r--r-- | opengl/tests/gldual/jni/gl_code.cpp | 4 | ||||
-rw-r--r-- | opengl/tests/gralloc/gralloc.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/linetex/linetex.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/swapinterval/swapinterval.cpp | 2 | ||||
-rw-r--r-- | opengl/tests/textures/textures.cpp | 2 |
15 files changed, 23 insertions, 23 deletions
diff --git a/opengl/tests/angeles/demo.c b/opengl/tests/angeles/demo.c index 39d871e968..30c3202bd4 100644 --- a/opengl/tests/angeles/demo.c +++ b/opengl/tests/angeles/demo.c @@ -462,7 +462,7 @@ static void drawFadeQuad() // Called from the app framework. void appInit() { - int a; + unsigned int a; glEnable(GL_NORMALIZE); glEnable(GL_DEPTH_TEST); @@ -492,7 +492,7 @@ void appInit() // Called from the app framework. void appDeinit() { - int a; + unsigned int a; for (a = 0; a < SUPERSHAPE_COUNT; ++a) freeGLObject(sSuperShapeObjects[a]); freeGLObject(sGroundPlane); diff --git a/opengl/tests/fillrate/fillrate.cpp b/opengl/tests/fillrate/fillrate.cpp index 2db63d7835..a42f3f2811 100644 --- a/opengl/tests/fillrate/fillrate.cpp +++ b/opengl/tests/fillrate/fillrate.cpp @@ -30,7 +30,7 @@ using namespace android; -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { EGLint configAttribs[] = { EGL_DEPTH_SIZE, 0, @@ -153,7 +153,7 @@ int main(int argc, char** argv) for (int c=1, j=0 ; c<32 ; c++, j++) { nsecs_t t = times[j]; - printf("%lld\t%d\t%f\n", t, c, (double(t)/c)/1000000.0); + printf("%ld\t%d\t%f\n", t, c, (double(t)/c)/1000000.0); } diff --git a/opengl/tests/finish/finish.cpp b/opengl/tests/finish/finish.cpp index ea3a60f514..ab955fe162 100644 --- a/opengl/tests/finish/finish.cpp +++ b/opengl/tests/finish/finish.cpp @@ -31,7 +31,7 @@ using namespace android; -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { EGLint configAttribs[] = { EGL_DEPTH_SIZE, 0, diff --git a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp index 405a3f029c..e0aafa219b 100644 --- a/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp +++ b/opengl/tests/gl2_copyTexImage/gl2_copyTexImage.cpp @@ -362,7 +362,7 @@ int printEGLConfigurations(EGLDisplay dpy) { return true; } -int main(int argc, char** argv) { +int main(int /*argc*/, char** /*argv*/) { EGLBoolean returnValue; EGLConfig myConfig = {0}; diff --git a/opengl/tests/gl2_jni/jni/gl_code.cpp b/opengl/tests/gl2_jni/jni/gl_code.cpp index c4180d4d9a..5af4f6b7cf 100644 --- a/opengl/tests/gl2_jni/jni/gl_code.cpp +++ b/opengl/tests/gl2_jni/jni/gl_code.cpp @@ -153,12 +153,12 @@ extern "C" { JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj); }; -JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj, jint width, jint height) +JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * /*env*/, jobject /*obj*/, jint width, jint height) { setupGraphics(width, height); } -JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * env, jobject obj) +JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_step(JNIEnv * /*env*/, jobject /*obj*/) { renderFrame(); } diff --git a/opengl/tests/gl_basic/gl_basic.cpp b/opengl/tests/gl_basic/gl_basic.cpp index e50d88fab1..0b663f796f 100644 --- a/opengl/tests/gl_basic/gl_basic.cpp +++ b/opengl/tests/gl_basic/gl_basic.cpp @@ -189,7 +189,7 @@ int printEGLConfigurations(EGLDisplay dpy) { return true; } -int main(int argc, char **argv) +int main(int /*argc*/, char **/*argv*/) { int q; int start, end; diff --git a/opengl/tests/gl_jni/jni/gl_code.cpp b/opengl/tests/gl_jni/jni/gl_code.cpp index 48944e0a45..3aa8adbc35 100644 --- a/opengl/tests/gl_jni/jni/gl_code.cpp +++ b/opengl/tests/gl_jni/jni/gl_code.cpp @@ -140,13 +140,13 @@ extern "C" { JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * env, jobject obj); }; -JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_init(JNIEnv * env, jobject obj, jint width, jint height) +JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_init(JNIEnv * /*env*/, jobject /*obj*/, jint width, jint height) { init_scene(width, height); create_texture(); } -JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_step(JNIEnv * env, jobject obj) +JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_step(JNIEnv * /*env*/, jobject /*obj*/) { const GLfloat vertices[] = { -1, -1, 0, @@ -177,7 +177,7 @@ JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_step(JNIEnv * env, jobjec glDrawElements(GL_TRIANGLES, nelem, GL_UNSIGNED_SHORT, quadIndices); } -JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * env, jobject obj) +JNIEXPORT void JNICALL Java_com_android_gljni_GLJNILib_changeBackground(JNIEnv * /*env*/, jobject /*obj*/) { background = 1.0f - background; } diff --git a/opengl/tests/gl_perf/gl2_perf.cpp b/opengl/tests/gl_perf/gl2_perf.cpp index 35df84fc0a..29988648e4 100644 --- a/opengl/tests/gl_perf/gl2_perf.cpp +++ b/opengl/tests/gl_perf/gl2_perf.cpp @@ -56,7 +56,7 @@ bool doTest(uint32_t w, uint32_t h); static EGLDisplay dpy; static EGLSurface surface; -int main(int argc, char** argv) { +int main(int /*argc*/, char** /*argv*/) { EGLBoolean returnValue; EGLConfig myConfig = {0}; diff --git a/opengl/tests/gl_perfapp/jni/gl_code.cpp b/opengl/tests/gl_perfapp/jni/gl_code.cpp index 946ee07c3a..0cb594a0b0 100644 --- a/opengl/tests/gl_perfapp/jni/gl_code.cpp +++ b/opengl/tests/gl_perfapp/jni/gl_code.cpp @@ -61,7 +61,7 @@ extern "C" { JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * env, jobject obj); }; -JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobject obj, jint width, jint height) +JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * /*env*/, jobject /*obj*/, jint width, jint height) { gWidth = width; gHeight = height; @@ -87,7 +87,7 @@ JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_init(JNIEnv * env, jobj } } -JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * env, jobject obj) +JNIEXPORT void JNICALL Java_com_android_glperf_GLPerfLib_step(JNIEnv * /*env*/, jobject /*obj*/) { if (! done) { if (stateClock > 0 && ((stateClock & 1) == 0)) { diff --git a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp index fad26a69c7..7ef3f4e34c 100644 --- a/opengl/tests/gl_yuvtex/gl_yuvtex.cpp +++ b/opengl/tests/gl_yuvtex/gl_yuvtex.cpp @@ -90,7 +90,7 @@ const bool yuvTexSameUV = false; static sp<GraphicBuffer> yuvTexBuffer; static GLuint yuvTex; -bool setupYuvTexSurface(EGLDisplay dpy, EGLContext context) { +static bool setupYuvTexSurface(EGLDisplay dpy) { int blockWidth = yuvTexWidth > 16 ? yuvTexWidth / 16 : 1; int blockHeight = yuvTexHeight > 16 ? yuvTexHeight / 16 : 1; yuvTexBuffer = new GraphicBuffer(yuvTexWidth, yuvTexHeight, yuvTexFormat, @@ -298,7 +298,7 @@ int main(int /*argc*/, char** /*argv*/) { printGLString("Renderer", GL_RENDERER); printGLString("Extensions", GL_EXTENSIONS); - if(!setupYuvTexSurface(dpy, context)) { + if(!setupYuvTexSurface(dpy)) { fprintf(stderr, "Could not set up texture surface.\n"); return 1; } diff --git a/opengl/tests/gldual/jni/gl_code.cpp b/opengl/tests/gldual/jni/gl_code.cpp index 3b114002f1..90d150ba09 100644 --- a/opengl/tests/gldual/jni/gl_code.cpp +++ b/opengl/tests/gldual/jni/gl_code.cpp @@ -153,12 +153,12 @@ extern "C" { JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_step(JNIEnv * env, jobject obj); }; -JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_init(JNIEnv * env, jobject obj, jint width, jint height)
+JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_init(JNIEnv * /*env*/, jobject /*obj*/, jint width, jint height)
{ setupGraphics(width, height); } -JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_step(JNIEnv * env, jobject obj) +JNIEXPORT void JNICALL Java_com_android_gldual_GLDualLib_step(JNIEnv * /*env*/, jobject /*obj*/) { renderFrame(); } diff --git a/opengl/tests/gralloc/gralloc.cpp b/opengl/tests/gralloc/gralloc.cpp index 8987040c80..29e0882cd0 100644 --- a/opengl/tests/gralloc/gralloc.cpp +++ b/opengl/tests/gralloc/gralloc.cpp @@ -37,7 +37,7 @@ void* lamecpy(void* d, void const* s, size_t size) { return d; } -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { size_t size = 128*256*4; void* temp = malloc(size); diff --git a/opengl/tests/linetex/linetex.cpp b/opengl/tests/linetex/linetex.cpp index 5ad695bc84..cdc051bc5a 100644 --- a/opengl/tests/linetex/linetex.cpp +++ b/opengl/tests/linetex/linetex.cpp @@ -29,7 +29,7 @@ using namespace android; -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { EGLint configAttribs[] = { EGL_DEPTH_SIZE, 0, diff --git a/opengl/tests/swapinterval/swapinterval.cpp b/opengl/tests/swapinterval/swapinterval.cpp index 3a8a8a184d..c4261e68f6 100644 --- a/opengl/tests/swapinterval/swapinterval.cpp +++ b/opengl/tests/swapinterval/swapinterval.cpp @@ -28,7 +28,7 @@ using namespace android; -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { EGLint configAttribs[] = { EGL_SURFACE_TYPE, EGL_WINDOW_BIT, diff --git a/opengl/tests/textures/textures.cpp b/opengl/tests/textures/textures.cpp index 1e55db0e07..7be942a764 100644 --- a/opengl/tests/textures/textures.cpp +++ b/opengl/tests/textures/textures.cpp @@ -27,7 +27,7 @@ using namespace android; -int main(int argc, char** argv) +int main(int /*argc*/, char** /*argv*/) { EGLint configAttribs[] = { EGL_DEPTH_SIZE, 0, |