This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new e64aa5f [test] add 'do {} while ()' for NO_PENDING_FATALS
e64aa5f is described below
commit e64aa5f5ec401deaee47399e409bd3c5119b8efd
Author: Alexey Serbin <[email protected]>
AuthorDate: Sun Sep 22 11:36:28 2019 -0700
[test] add 'do {} while ()' for NO_PENDING_FATALS
This patch adds 'do {} while ()' scope around the definition of the
NO_PENDING_FATALS macro, unifying it with others from test_macros.h.
The motivation for this change was seeing warnings on an empty statement
generated by QtCreator IDE.
Change-Id: Icc97db2b761fec44bfa8b45f81210fb09124b866
Reviewed-on: http://gerrit.cloudera.org:8080/14278
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <[email protected]>
---
src/kudu/util/test_macros.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/kudu/util/test_macros.h b/src/kudu/util/test_macros.h
index 393867d..b82c453 100644
--- a/src/kudu/util/test_macros.h
+++ b/src/kudu/util/test_macros.h
@@ -26,8 +26,9 @@
// Detect fatals in the surrounding scope. NO_FATALS() only checks for fatals
// in the expression passed to it.
-#define NO_PENDING_FATALS() \
- if (testing::Test::HasFatalFailure()) { return; }
+#define NO_PENDING_FATALS() do { \
+ if (testing::Test::HasFatalFailure()) { return; } \
+} while (0)
#define ASSERT_OK(status) do { \
const Status& _s = status; \