From 99da728a3d88d3b35ddcd90fa780458889f8cdba Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Fri, 13 Sep 2013 17:46:41 +0800 Subject: [PATCH] Fix error about multiple unsequenced modifications The evaluation order of function args aren't gaurenteed in C++ jni/NDKSupport/vecmath.h:869:32: warning: multiple unsequenced modifications to 'i' [-Wunsequenced] LOGI("%f %f %f %f", f[i++], f[i++], f[i++], f[i++]); Change-Id: Ibf69978dd3abf57a7042624aad3d416a0f6f5e01 --- .../android-18/samples/Teapot/jni/NDKSupport/vecmath.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ndk/platforms/android-18/samples/Teapot/jni/NDKSupport/vecmath.h b/ndk/platforms/android-18/samples/Teapot/jni/NDKSupport/vecmath.h index 03bba7744..8fcfca086 100644 --- a/ndk/platforms/android-18/samples/Teapot/jni/NDKSupport/vecmath.h +++ b/ndk/platforms/android-18/samples/Teapot/jni/NDKSupport/vecmath.h @@ -863,10 +863,10 @@ public: void dump() { int32_t i = 0; - LOGI("%f %f %f %f", f[i++], f[i++], f[i++], f[i++]); - LOGI("%f %f %f %f", f[i++], f[i++], f[i++], f[i++]); - LOGI("%f %f %f %f", f[i++], f[i++], f[i++], f[i++]); - LOGI("%f %f %f %f", f[i++], f[i++], f[i++], f[i++]); + LOGI("%f %f %f %f", f[0], f[1], f[2], f[3]); + LOGI("%f %f %f %f", f[4], f[5], f[6], f[7]); + LOGI("%f %f %f %f", f[8], f[9], f[10], f[11]); + LOGI("%f %f %f %f", f[12], f[13], f[14], f[15]); } };