From 183cc6d51183fcd45415fb80d481a81d57cfd034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Sun, 9 Mar 2014 11:51:08 +0000 Subject: [PATCH] The dummy constants have moved to oath_constants.h. Add annotation macros for coverage analysis. git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@774 185d5e19-27fe-0310-9dcf-9bff6b9f3609 --- lib/liboath/oath_impl.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/liboath/oath_impl.h b/lib/liboath/oath_impl.h index 9a83699..f05b3fa 100644 --- a/lib/liboath/oath_impl.h +++ b/lib/liboath/oath_impl.h @@ -32,11 +32,21 @@ #ifndef OATH_IMPL_H_INCLUDED #define OATH_IMPL_H_INCLUDED +#if _BullseyeCoverage +#define COVERAGE_DISABLE _Pragma("BullseyeCoverage save off") +#define COVERAGE_RESTORE _Pragma("BullseyeCoverage restore") +#else +#define COVERAGE_DISABLE +#define COVERAGE_RESTORE +#endif + /* - * Dummy key parameters + * Use at end of switch which has no default case */ -#define OATH_DUMMY_LABEL ("oath-dummy-key") -#define OATH_DUMMY_LABELLEN (sizeof DUMMY_LABEL) -#define OATH_DUMMY_KEYLEN 80 +#define COVERAGE_NO_DEFAULT_CASE \ + COVERAGE_DISABLE \ + default: \ + (void)0; \ + COVERAGE_RESTORE #endif