From 2237a13d5bd35f14d27a73047c1de1927c26e08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sat, 9 Jan 2016 18:37:36 +0100 Subject: [PATCH] Hide the no-op default case when not instrumenting for coverage analysis. --- include/cryb/coverage.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/cryb/coverage.h b/include/cryb/coverage.h index 647825b..e7ce347 100644 --- a/include/cryb/coverage.h +++ b/include/cryb/coverage.h @@ -43,10 +43,14 @@ /* * Use at end of switch which has no default case */ +#if CRYB_COVERAGE #define CRYB_NO_DEFAULT_CASE \ CRYB_DISABLE_COVERAGE \ default: \ (void)0; \ CRYB_RESTORE_COVERAGE +#else +#define CRYB_NO_DEFAULT_CASE +#endif #endif