Skip to content

Commit 41012d9

Browse files
committed
Fix compile without error logging
1 parent b52b362 commit 41012d9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/codegen-interaction-model/CodegenDataModel.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ InteractionModel::ClusterEntry FirstServerClusterEntry(EndpointId endpointId, co
9292
return *entryValue;
9393
}
9494

95+
#if CHIP_ERROR_LOGGING
9596
if (CHIP_ERROR * errValue = std::get_if<CHIP_ERROR>(&entry))
9697
{
9798
ChipLogError(AppServer, "Failed to load cluster entry: %" CHIP_ERROR_FORMAT, errValue->Format());
@@ -101,6 +102,7 @@ InteractionModel::ClusterEntry FirstServerClusterEntry(EndpointId endpointId, co
101102
// Should NOT be possible: entryFrom has only 2 variants
102103
ChipLogError(AppServer, "Failed to load cluster entry, UNKNOWN entry return type");
103104
}
105+
#endif
104106
}
105107

106108
return InteractionModel::ClusterEntry::kInvalid;
@@ -381,7 +383,11 @@ std::optional<InteractionModel::ClusterInfo> CodegenDataModel::GetClusterInfo(co
381383

382384
if (CHIP_ERROR * err = std::get_if<CHIP_ERROR>(&info))
383385
{
386+
#if CHIP_ERROR_LOGGING
384387
ChipLogError(AppServer, "Failed to load cluster info: %" CHIP_ERROR_FORMAT, err->Format());
388+
#else
389+
(void)err->Format();
390+
#endif
385391
return std::nullopt;
386392
}
387393

0 commit comments

Comments
 (0)