Removing code coverage for unreachable code.

pull/4302/head
Nicolas "Pixel" Noble 9 years ago
parent 9d43a676dc
commit c61d0e178f
  1. 4
      Makefile
  2. 9
      include/grpc/support/port_platform.h
  3. 4
      templates/Makefile.template

@ -189,9 +189,9 @@ CC_gcov = gcc
CXX_gcov = g++ CXX_gcov = g++
LD_gcov = gcc LD_gcov = gcc
LDXX_gcov = g++ LDXX_gcov = g++
CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type
LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic
DEFINES_gcov = _DEBUG DEBUG DEFINES_gcov = _DEBUG DEBUG GCOV
# General settings. # General settings.

@ -183,7 +183,7 @@
#endif #endif
#define GPR_MSG_IOVLEN_TYPE int #define GPR_MSG_IOVLEN_TYPE int
#if TARGET_OS_IPHONE #if TARGET_OS_IPHONE
#define GPR_FORBID_UNREACHABLE_CODE #define GPR_FORBID_UNREACHABLE_CODE 1
#define GPR_PLATFORM_STRING "ios" #define GPR_PLATFORM_STRING "ios"
#define GPR_CPU_IPHONE 1 #define GPR_CPU_IPHONE 1
#define GPR_PTHREAD_TLS 1 #define GPR_PTHREAD_TLS 1
@ -252,6 +252,11 @@
#define GPR_PLATFORM_STRING "unknown" #define GPR_PLATFORM_STRING "unknown"
#endif #endif
#ifdef GCOV
#undef GPR_FORBID_UNREACHABLE_CODE
#define GPR_FORBID_UNREACHABLE_CODE 1
#endif
/* For a common case, assume that the platform has a C99-like stdint.h */ /* For a common case, assume that the platform has a C99-like stdint.h */
#include <stdint.h> #include <stdint.h>
@ -337,7 +342,7 @@ typedef uintptr_t gpr_uintptr;
#endif #endif
#endif #endif
#ifdef GPR_FORBID_UNREACHABLE_CODE #if GPR_FORBID_UNREACHABLE_CODE
#define GPR_UNREACHABLE_CODE(STATEMENT) #define GPR_UNREACHABLE_CODE(STATEMENT)
#else #else
#define GPR_UNREACHABLE_CODE(STATEMENT) \ #define GPR_UNREACHABLE_CODE(STATEMENT) \

@ -205,9 +205,9 @@
CXX_gcov = g++ CXX_gcov = g++
LD_gcov = gcc LD_gcov = gcc
LDXX_gcov = g++ LDXX_gcov = g++
CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage CPPFLAGS_gcov = -O0 -fprofile-arcs -ftest-coverage -Wno-return-type
LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic LDFLAGS_gcov = -fprofile-arcs -ftest-coverage -rdynamic
DEFINES_gcov = _DEBUG DEBUG DEFINES_gcov = _DEBUG DEBUG GCOV
# General settings. # General settings.

Loading…
Cancel
Save