From cf809bd16ae488ba59361ea08fa6b302a25d035d Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Wed, 8 Jan 2020 14:42:31 -0800 Subject: [PATCH] [ncp/cli/posix-app] disable coverage test when macro not defined (#4458) This change help suppress the undefined macro warnings. --- examples/apps/cli/main.c | 4 ++++ examples/apps/ncp/main.c | 4 ++++ src/posix/main.c | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/examples/apps/cli/main.c b/examples/apps/cli/main.c index 357964114..934b4a5db 100644 --- a/examples/apps/cli/main.c +++ b/examples/apps/cli/main.c @@ -46,6 +46,10 @@ jmp_buf gResetJump; void __gcov_flush(); #endif +#ifndef OPENTHREAD_ENABLE_COVERAGE +#define OPENTHREAD_ENABLE_COVERAGE 0 +#endif + #if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE void *otPlatCAlloc(size_t aNum, size_t aSize) { diff --git a/examples/apps/ncp/main.c b/examples/apps/ncp/main.c index d98221532..8fdd54427 100644 --- a/examples/apps/ncp/main.c +++ b/examples/apps/ncp/main.c @@ -45,6 +45,10 @@ jmp_buf gResetJump; void __gcov_flush(); #endif +#ifndef OPENTHREAD_ENABLE_COVERAGE +#define OPENTHREAD_ENABLE_COVERAGE 0 +#endif + #if OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE void *otPlatCAlloc(size_t aNum, size_t aSize) { diff --git a/src/posix/main.c b/src/posix/main.c index 68a8e815e..dc2f46bcb 100644 --- a/src/posix/main.c +++ b/src/posix/main.c @@ -62,6 +62,10 @@ #endif #include +#ifndef OPENTHREAD_ENABLE_COVERAGE +#define OPENTHREAD_ENABLE_COVERAGE 0 +#endif + typedef struct PosixConfig { otPlatformConfig mPlatformConfig; ///< Platform configuration.