diff mbox

[Branch,~glmark2-dev/glmark2/trunk] Rev 195: Android, Util: Fix build warnings.

Message ID 20120213101312.17381.79453.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

alexandros.frantzis@linaro.org Feb. 13, 2012, 10:13 a.m. UTC
------------------------------------------------------------
revno: 195
committer: Alexandros Frantzis <alexandros.frantzis@linaro.org>
branch nick: trunk
timestamp: Mon 2012-02-13 11:53:57 +0200
message:
  Android,Util: Fix build warnings.
modified:
  src/android.cpp
  src/libmatrix/util.h


--
lp:glmark2
https://code.launchpad.net/~glmark2-dev/glmark2/trunk

You are subscribed to branch lp:glmark2.
To unsubscribe from this branch go to https://code.launchpad.net/~glmark2-dev/glmark2/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'src/android.cpp'
--- src/android.cpp	2012-01-27 22:01:59 +0000
+++ src/android.cpp	2012-02-13 09:53:57 +0000
@@ -51,6 +51,8 @@ 
 Java_org_linaro_glmark2_Glmark2Renderer_nativeInit(JNIEnv* env, jclass clazz,
                                                    jobject asset_manager)
 {
+    static_cast<void>(clazz);
+
     Log::init("glmark2", false);
     Util::android_set_asset_manager(AAssetManager_fromJava(env, asset_manager));
 
@@ -82,6 +84,9 @@ 
                                                      jint w,
                                                      jint h)
 {
+    static_cast<void>(env);
+    static_cast<void>(clazz);
+
     Log::debug("Resizing to %d x %d\n", w, h);
     g_canvas->resize(w, h);
 }
@@ -89,12 +94,15 @@ 
 void
 Java_org_linaro_glmark2_Glmark2Renderer_nativeDone(JNIEnv* env)
 {
+    static_cast<void>(env);
+
     delete g_canvas;
 }
 
 jboolean
 Java_org_linaro_glmark2_Glmark2Renderer_nativeRender(JNIEnv* env)
 {
+    static_cast<void>(env);
     static std::vector<Benchmark *>::iterator bench_iter = g_benchmarks.begin();
     static Scene *scene = 0;
     static unsigned int score = 0;
@@ -203,6 +211,7 @@ 
 extern "C" jint
 JNI_OnLoad(JavaVM* vm, void* reserved)
 {
+    static_cast<void>(reserved);
     JNIEnv* env = NULL;
     jint result = -1;
 

=== modified file 'src/libmatrix/util.h'
--- src/libmatrix/util.h	2012-01-27 22:01:59 +0000
+++ src/libmatrix/util.h	2012-02-13 09:53:57 +0000
@@ -44,7 +44,7 @@ 
     fromString(const std::string& asString)
     {
         std::stringstream ss(asString);
-        T retVal;
+        T retVal = T();
         ss >> retVal;
         return retVal;
     }