summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opengl/libs/EGL/trace.cpp2
-rw-r--r--opengl/libs/hooks.h4
-rw-r--r--opengl/tests/angeles/demo.c2
-rw-r--r--opengl/tests/hwc/hwcColorEquiv.cpp2
-rw-r--r--opengl/tests/hwc/hwcCommit.cpp2
-rw-r--r--opengl/tests/hwc/hwcRects.cpp2
-rw-r--r--opengl/tests/hwc/hwcStress.cpp2
7 files changed, 8 insertions, 8 deletions
diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp
index 4f07053bad..248a1a04f6 100644
--- a/opengl/libs/EGL/trace.cpp
+++ b/opengl/libs/EGL/trace.cpp
@@ -409,7 +409,7 @@ EGLAPI gl_hooks_t gHooksSystrace = {
#define CHECK_ERROR(_c, _api) \
GLenum status = GL_NO_ERROR; \
bool error = false; \
- while ((status = _c->glGetError()) != GL_NO_ERROR) { \
+ while ((status = (_c)->glGetError()) != GL_NO_ERROR) { \
ALOGD("[" #_api "] 0x%x", status); \
error = true; \
} \
diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h
index 3f36b7d6e6..50107760e3 100644
--- a/opengl/libs/hooks.h
+++ b/opengl/libs/hooks.h
@@ -55,8 +55,8 @@ namespace android {
#undef GL_ENTRY
#undef EGL_ENTRY
-#define GL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__);
-#define EGL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__);
+#define GL_ENTRY(_r, _api, ...) _r (*(_api))(__VA_ARGS__);
+#define EGL_ENTRY(_r, _api, ...) _r (*(_api))(__VA_ARGS__);
struct egl_t {
#include "EGL/egl_entries.in"
diff --git a/opengl/tests/angeles/demo.c b/opengl/tests/angeles/demo.c
index 802f3980fa..39d871e968 100644
--- a/opengl/tests/angeles/demo.c
+++ b/opengl/tests/angeles/demo.c
@@ -666,7 +666,7 @@ static void gluLookAt(GLfloat eyex, GLfloat eyey, GLfloat eyez,
y[2] /= mag;
}
-#define M(row,col) m[col*4+row]
+#define M(row,col) m[(col)*4+(row)]
M(0, 0) = x[0];
M(0, 1) = x[1];
M(0, 2) = x[2];
diff --git a/opengl/tests/hwc/hwcColorEquiv.cpp b/opengl/tests/hwc/hwcColorEquiv.cpp
index 06a0191f60..085f374a4f 100644
--- a/opengl/tests/hwc/hwcColorEquiv.cpp
+++ b/opengl/tests/hwc/hwcColorEquiv.cpp
@@ -115,7 +115,7 @@ const float defaultEndDelay = 2.0; // Default delay after rendering graphics
#define CMD_START_FRAMEWORK "start 2>&1"
// Macros
-#define NUMA(a) (sizeof(a) / sizeof(a [0])) // Num elements in an array
+#define NUMA(a) (sizeof(a) / sizeof((a)[0])) // Num elements in an array
#define MEMCLR(addr, size) do { \
memset((addr), 0, (size)); \
} while (0)
diff --git a/opengl/tests/hwc/hwcCommit.cpp b/opengl/tests/hwc/hwcCommit.cpp
index 5d7f810f95..6005b990a7 100644
--- a/opengl/tests/hwc/hwcCommit.cpp
+++ b/opengl/tests/hwc/hwcCommit.cpp
@@ -157,7 +157,7 @@ const struct blendType {
#define CMD_START_FRAMEWORK "start 2>&1"
// Macros
-#define NUMA(a) (sizeof(a) / sizeof(a [0])) // Num elements in an array
+#define NUMA(a) (sizeof(a) / sizeof((a)[0])) // Num elements in an array
// Local types
class Rectangle {
diff --git a/opengl/tests/hwc/hwcRects.cpp b/opengl/tests/hwc/hwcRects.cpp
index 56c1a2ad39..ba242abd59 100644
--- a/opengl/tests/hwc/hwcRects.cpp
+++ b/opengl/tests/hwc/hwcRects.cpp
@@ -137,7 +137,7 @@ const struct hwc_rect defaultDisplayFrame = {0, 0, 100, 100};
#define CMD_START_FRAMEWORK "start 2>&1"
// Macros
-#define NUMA(a) (sizeof(a) / sizeof(a [0])) // Num elements in an array
+#define NUMA(a) (sizeof(a) / sizeof((a)[0])) // Num elements in an array
// Local types
class Rectangle {
diff --git a/opengl/tests/hwc/hwcStress.cpp b/opengl/tests/hwc/hwcStress.cpp
index b1d6c764f8..e6e5194e83 100644
--- a/opengl/tests/hwc/hwcStress.cpp
+++ b/opengl/tests/hwc/hwcStress.cpp
@@ -161,7 +161,7 @@ bool eFlag, sFlag, pFlag;
#define CMD_STOP_FRAMEWORK "stop 2>&1"
#define CMD_START_FRAMEWORK "start 2>&1"
-#define NUMA(a) (sizeof(a) / sizeof(a [0]))
+#define NUMA(a) (sizeof(a) / sizeof((a)[0]))
#define MEMCLR(addr, size) do { \
memset((addr), 0, (size)); \
} while (0)