From f40dea640fb19ee287ad9fcc9a39fc53abf65c2e Mon Sep 17 00:00:00 2001 From: Michael Spang Date: Thu, 27 May 2021 15:44:23 -0400 Subject: [PATCH] Fix dependency checker in the unified build Add a preprocessor condition to avoid including when shell integration is disabled. Unfortunately, since the checker doesn't preprocess the code, this results in a false positive. Suppress that with // nogncheck. fixes #7200 --- examples/platform/linux/AppMain.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/examples/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index c5968cb66a81e1..f1c7cc040c63cd 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -25,12 +25,15 @@ #include #include #include -#include #include #include #include #include +#if defined(CHIP_ENABLE_SHELL) +#include // nogncheck +#endif + #if defined(PW_RPC_ENABLED) #include #endif @@ -41,7 +44,10 @@ using namespace chip; using namespace chip::Inet; using namespace chip::Transport; using namespace chip::DeviceLayer; + +#if defined(CHIP_ENABLE_SHELL) using chip::Shell::Engine; +#endif namespace { void EventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg)