[Mesa-dev] [PATCH v2] amd_performance_monitor: Fix multi-statement macro 'report'.
Vinson Lee
vlee at freedesktop.org
Tue May 7 14:04:22 PDT 2013
Fixes "Nesting level does not match indentation" defect reported by
Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
tests/spec/amd_performance_monitor/api.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/spec/amd_performance_monitor/api.c b/tests/spec/amd_performance_monitor/api.c
index 7b321cf..3205fc0 100644
--- a/tests/spec/amd_performance_monitor/api.c
+++ b/tests/spec/amd_performance_monitor/api.c
@@ -113,8 +113,10 @@ find_invalid_counter(unsigned *counters, int num_counters)
}
#define report(pass) \
- piglit_report_subtest_result((pass) ? PIGLIT_PASS : PIGLIT_FAIL, __FUNCTION__); \
- return
+ do { \
+ piglit_report_subtest_result((pass) ? PIGLIT_PASS : PIGLIT_FAIL, __FUNCTION__); \
+ return; \
+ } while (0)
/******************************************************************************/
--
1.8.2.1
More information about the mesa-dev
mailing list