aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-10-12 21:21:18 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-10-12 21:21:18 -0700
commit9c97aaed0870420eccf0c8100455d35dff32837c (patch)
treed7cdf3e0a52c02bb2e392c42534c82a3b336e2b8 /include
parent3ba678cca0fb6a0fc479e1f673f9f7131b0a1e1f (diff)
parent041d90ada9301d73be4c2daf291b56df547f826e (diff)
Merge branch 'master' of github.com:grpc/grpc into cq_alarm
Diffstat (limited to 'include')
-rw-r--r--include/grpc/support/port_platform.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h
index 434dd6de87..f98038da52 100644
--- a/include/grpc/support/port_platform.h
+++ b/include/grpc/support/port_platform.h
@@ -181,6 +181,7 @@
#ifndef _BSD_SOURCE
#define _BSD_SOURCE
#endif
+#define GPR_FORBID_UNREACHABLE_CODE
#define GPR_MSG_IOVLEN_TYPE int
#if TARGET_OS_IPHONE
#define GPR_PLATFORM_STRING "ios"
@@ -336,4 +337,15 @@ typedef uintptr_t gpr_uintptr;
#endif
#endif
+#ifdef GPR_FORBID_UNREACHABLE_CODE
+#define GPR_UNREACHABLE_CODE(STATEMENT)
+#else
+#define GPR_UNREACHABLE_CODE(STATEMENT) \
+ do { \
+ gpr_log(GPR_ERROR, "Should never reach here."); \
+ abort(); \
+ STATEMENT; \
+ } while (0)
+#endif /* GPR_FORBID_UNREACHABLE_CODE */
+
#endif /* GRPC_SUPPORT_PORT_PLATFORM_H */