Skip to content

Commit

Permalink
Fix dependency checker in the unified build
Browse files Browse the repository at this point in the history
Add a preprocessor condition to avoid including <lib/shell/Engine.h>
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 project-chip#7200
  • Loading branch information
mspang committed May 27, 2021
1 parent 7a172f3 commit f40dea6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/platform/linux/AppMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,15 @@
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <core/CHIPError.h>
#include <lib/shell/Engine.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
#include <setup_payload/SetupPayload.h>
#include <support/CHIPMem.h>
#include <support/RandUtils.h>

#if defined(CHIP_ENABLE_SHELL)
#include <lib/shell/Engine.h> // nogncheck
#endif

#if defined(PW_RPC_ENABLED)
#include <CommonRpc.h>
#endif
Expand All @@ -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)
Expand Down

0 comments on commit f40dea6

Please sign in to comment.