Skip to content

Commit

Permalink
Some changes to make darwin builds happy
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 committed Jun 28, 2024
1 parent fedfc79 commit 2a632f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/codegen-data-model/CodegenDataModel_Write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ CHIP_ERROR DecodeStringLikeIntoEmberBuffer(AttributeValueDecoder decoder, bool i
ReturnErrorOnFailure(decoder.Decode(workingValue));
}

typename ENCODING::LengthType len = workingValue.size();
typename ENCODING::LengthType len = static_cast<typename ENCODING::LengthType>(workingValue.size());
VerifyOrReturnError(out.size() >= sizeof(len) + len, CHIP_ERROR_BUFFER_TOO_SMALL);

memcpy(out.data(), &len, sizeof(len));
Expand Down Expand Up @@ -325,9 +325,9 @@ CHIP_ERROR CodegenDataModel::WriteAttribute(const InteractionModel::WriteAttribu
record.clusterId = request.path.mClusterId;
record.attributeId = request.path.mAttributeId;

Protocols::InteractionModel::Status status =
emAfReadOrWriteAttribute(&record, attributeMetadata, gEmberAttributeIOBufferSpan.data(), gEmberAttributeIOBufferSpan.size(),
/* write = */ true);
Protocols::InteractionModel::Status status = emAfReadOrWriteAttribute(
&record, attributeMetadata, gEmberAttributeIOBufferSpan.data(), static_cast<uint16_t>(gEmberAttributeIOBufferSpan.size()),
/* write = */ true);

if (status != Protocols::InteractionModel::Status::Success)
{
Expand Down

0 comments on commit 2a632f3

Please sign in to comment.