8000 39128: pw_tokenizer format by arielsz71 · Pull Request #39629 · project-chip/connectedhomeip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

39128: pw_tokenizer format #39629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5b58371
39128: pw_tokenizer format
arielsz71 Jun 19, 2025
1b67894
Restyled by clang-format
restyled-commits Jun 23, 2025
8696168
Addressing review comments
arielsz71 Jun 23, 2025
a44b642
Restyled by clang-format
restyled-commits Jun 23, 2025
c55151e
Addressing review comments
arielsz71 Jun 24, 2025
f0334c6
Restyled by clang-format
restyled-commits Jun 24, 2025
f45d0ea
Rename FormatUtils.h as StringFormatting.h
arielsz71 Jun 25, 2025
49d9e5e
Restyled by clang-format
restyled-commits Jun 25, 2025
413e407
Restyled by gn
restyled-commits Jun 25, 2025
71d084b
Addressing review comments
arielsz71 Jun 25, 2025
69ed284
Restyled by clang-format
restyled-commits Jun 25, 2025
eb7ba34
Adding StringOf() overload for ByteSpan
arielsz71 Jun 25, 2025
6431ecd
Code update
arielsz71 Jun 25, 2025
f5bd17c
Restyled by clang-format
restyled-commits Jun 25, 2025
20087fc
Code update
arielsz71 Jun 26, 2025
62e93e8
Adding additional constructors to StringBuilder
arielsz71 Jun 26, 2025
e1000bb
Restyled by clang-format
restyled-commits Jun 26, 2025
624b0eb
Code update
arielsz71 Jun 26, 2025
8e61b54
Code update
arielsz71 Jun 26, 2025
ad09136
Addressing review comments
arielsz71 Jun 30, 2025
7e8b5c1
Restyled by clang-format
restyled-commits Jun 30, 2025
127b824
Use Uint8::to_const_char() instead of regular cast
arielsz71 Jul 1, 2025
41a1225
Addressing review comments
arielsz71 Jul 2, 2025
1eccc53
Code update
arielsz71 Jul 2, 2025
1b04c98
Restyled by clang-format
restyled-commits Jul 2, 2025
46d89c7
Code update
arielsz71 Jul 2, 2025
dcda996
Restyled by clang-format
restyled-commits Jul 2, 2025
a6f8323
Code update
arielsz71 Jul 2, 2025
a460708
Code update
arielsz71 Jul 3, 2025
49cc170
Restyled by clang-format
restyled-commits Jul 3, 2025
f5987cc
Update comment
arielsz71 Jul 3, 2025
2a43382
Merge branch 'master' into 39128_pw_tokenizer_format
arielsz71 Jul 10, 2025
e834060
Add StringBuilder unit tests
arielsz71 Jul 11, 2025
d641905
Restyled by clang-format
restyled-commits Jul 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions examples/camera-controller/commands/common/HexConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <lib/core/CHIPError.h>
#include <lib/support/BytesToHex.h>
#include <lib/support/Span.h>
#include <lib/support/StringBuilder.h>
#include <lib/support/logging/CHIPLogging.h>

/**
Expand All @@ -40,8 +41,8 @@ CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount

if (hex.size() % 2 != 0)
{
ChipLogError(NotSpecified, "Error while encoding '%.*s' as an octet string: Odd number of characters.",
static_cast<int>(hex.size()), hex.data());
ChipLogError(NotSpecified, "Error while encoding '%s' as an octet string: Odd number of characters.",
chip::NullTerminated(hex).c_str());
return CHIP_ERROR_INVALID_STRING_LENGTH;
}

Expand All @@ -56,7 +57,7 @@ CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount
size_t byteCount = chip::Encoding::HexToBytes(hex.data(), hex.size(), buffer, bufferSize);
if (byteCount == 0 && hex.size() != 0)
{
ChipLogError(NotSpecified, "Error while encoding '%.*s' as an octet string.", static_cast<int>(hex.size()), hex.data());
ChipLogError(NotSpecified, "Error while encoding '%s' as an octet string.", chip::NullTerminated(hex).c_str());
return CHIP_ERROR_INTERNAL;
}

Expand Down
20 changes: 10 additions & 10 deletions examples/chef/common/clusters/door-lock/chef-lock-endpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/util/config.h>
#include <cstring>
#include <lib/support/StringBuilder.h>
#include <platform/CHIPDeviceLayer.h>
#include <platform/internal/CHIPDeviceLayerInternal.h>

Expand Down Expand Up @@ -100,9 +101,9 @@ bool LockEndpoint::GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & u

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,adjustedIndex=%hu,name=\"%.*s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u,"
"[endpoint=%d,adjustedIndex=%hu,name=\"%s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
mEndpointId, adjustedUserIndex, static_cast<int>(user.userName.size()), user.userName.data(),
mEndpointId, adjustedUserIndex, chip::NullTerminated(user.userName).c_str(),
static_cast<unsigned int>(user.credentials.size()), user.userUniqueId, to_underlying(user.userType),
to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

Expand All @@ -113,14 +114,13 @@ bool LockEndpoint::SetUser(uint16_t userIndex, chip::FabricIndex creator, chip::
const chip::CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum usertype,
CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials)
{
ChipLogProgress(Zcl,
"Lock App: LockEndpoint::SetUser "
"[endpoint=%d,userIndex=%u,creator=%d,modifier=%d,userName=\"%.*s\",uniqueId=%" PRIx32
",userStatus=%u,userType=%u,"
"credentialRule=%u,credentials=%p,totalCredentials=%u]",
mEndpointId, userIndex, creator, modifier, static_cast<int>(userName.size()), userName.data(), uniqueId,
to_underlying(userStatus), to_underlying(usertype), to_underlying(credentialRule), credentials,
static_cast<unsigned int>(totalCredentials));
ChipLogProgress(
Zcl,
"Lock App: LockEndpoint::SetUser "
"[endpoint=%d,userIndex=%u,creator=%d,modifier=%d,userName=\"%s\",uniqueId=%" PRIx32 ",userStatus=%u,userType=%u,"
"credentialRule=%u,credentials=%p,totalCredentials=%u]",
mEndpointId, userIndex, creator, modifier, chip::NullTerminated(userName).c_str(), uniqueId, to_underlying(userStatus),
to_underlying(usertype), to_underlying(credentialRule), credentials, static_cast<unsigned int>(totalCredentials));

auto adjustedUserIndex = static_cast<uint16_t>(userIndex - 1);
if (adjustedUserIndex > mLockUsers.size())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include "BDXDiagnosticLogsServerDelegate.h"
#include <lib/support/StringBuilder.h>

#include <string>
#include <unistd.h>
Expand Down Expand Up @@ -95,8 +96,8 @@ void LogFileDesignator(const char * prefix, const chip::CharSpan & fileDesignato
{
#if CHIP_PROGRESS_LOGGING
auto size = static_cast<uint16_t>(fileDesignator.size());
auto data = fileDesignator.data();
ChipLogProgress(chipTool, "%s (%u): %.*s", prefix, size, size, data);

ChipLogProgress(chipTool, "%s (%u): %s", prefix, size, chip::NullTerminated(fileDesignator).c_str());
#endif // CHIP_PROGRESS_LOGGING

if (CHIP_NO_ERROR != error)
Expand Down
7 changes: 4 additions & 3 deletions examples/chip-tool/commands/common/HexConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <lib/core/CHIPError.h>
#include <lib/support/BytesToHex.h>
#include <lib/support/Span.h>
#include <lib/support/StringBuilder.h>
#include <lib/support/logging/CHIPLogging.h>

/**
Expand All @@ -40,8 +41,8 @@ CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount

if (hex.size() % 2 != 0)
{
ChipLogError(chipTool, "Error while encoding '%.*s' as an octet string: Odd number of characters.",
static_cast<int>(hex.size()), hex.data());
ChipLogError(chipTool, "Error while encoding '%s' as an octet string: Odd number of characters.",
chip::NullTerminated(hex).c_str());
return CHIP_ERROR_INVALID_STRING_LENGTH;
}

Expand All @@ -56,7 +57,7 @@ CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount
size_t byteCount = chip::Encoding::HexToBytes(hex.data(), hex.size(), buffer, bufferSize);
if (byteCount == 0 && hex.size() != 0)
{
ChipLogError(chipTool, "Error while encoding '%.*s' as an octet string.", static_cast<int>(hex.size()), hex.data());
ChipLogError(chipTool, "Error while encoding '%s' as an octet string.", chip::NullTerminated(hex).c_str());
return CHIP_ERROR_INTERNAL;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ Status EnergyEvseDelegate::HwSetVehicleID(const CharSpan & newValue)
memcpy(mVehicleIDBuf, newValue.data(), newValue.size());
mVehicleID = MakeNullable(CharSpan(mVehicleIDBuf, newValue.size()));

ChipLogDetail(AppServer, "VehicleID updated %.*s", static_cast<int>(mVehicleID.Value().size()), mVehicleID.Value().data());
ChipLogDetail(AppServer, "VehicleID updated %s", NullTerminated(mVehicleID.Value()).c_str());
MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, VehicleID::Id);

return Status::Success;
Expand Down
7 changes: 4 additions & 3 deletions examples/fabric-admin/commands/common/HexConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <lib/core/CHIPError.h>
#include <lib/support/BytesToHex.h>
#include <lib/support/Span.h>
#include <lib/support/StringBuilder.h>
#include <lib/support/logging/CHIPLogging.h>

/**
Expand All @@ -40,8 +41,8 @@ CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount

if (hex.size() % 2 != 0)
{
ChipLogError(NotSpecified, "Error while encoding '%.*s' as an octet string: Odd number of characters.",
static_cast<int>(hex.size()), hex.data());
ChipLogError(NotSpecified, "Error while encoding '%s' as an octet string: Odd number of characters.",
chip::NullTerminated(hex).c_str());
return CHIP_ERROR_INVALID_STRING_LENGTH;
}

Expand All @@ -56,7 +57,7 @@ CHIP_ERROR HexToBytes(chip::CharSpan hex, F bufferAllocator, size_t * octetCount
size_t byteCount = chip::Encoding::HexToBytes(hex.data(), hex.size(), buffer, bufferSize);
if (byteCount == 0 && hex.size() != 0)
{
ChipLogError(NotSpecified, "Error while encoding '%.*s' as an octet string.", static_cast<int>(hex.size()), hex.data());
ChipLogError(NotSpecified, "Error while encoding '%s' as an octet string.", chip::NullTerminated(hex).c_str());
return CHIP_ERROR_INTERNAL;
}

Expand Down
7 changes: 3 additions & 4 deletions examples/lock-app/genio/src/LockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,10 @@ bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, Ember

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"[endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(),
user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy,
user.lastModifiedBy);
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

return true;
}
Expand Down
7 changes: 3 additions & 4 deletions examples/lock-app/infineon/cyw30739/src/LockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,10 @@ bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, Ember

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"[endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(),
user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy,
user.lastModifiedBy);
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

return true;
}
Expand Down
7 changes: 3 additions & 4 deletions examples/lock-app/infineon/psoc6/src/LockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,11 +335,10 @@ bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, Ember

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"[endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(),
user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy,
user.lastModifiedBy);
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

return true;
}
Expand Down
20 changes: 10 additions & 10 deletions examples/lock-app/lock-common/src/LockEndpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <app-common/zap-generated/cluster-enums.h>
#include <cstring>
#include <lib/core/CHIPEncoding.h>
#include <lib/support/StringBuilder.h>
#include <platform/CHIPDeviceLayer.h>
#include <platform/internal/CHIPDeviceLayerInternal.h>

Expand Down Expand Up @@ -101,9 +102,9 @@ bool LockEndpoint::GetUser(uint16_t userIndex, EmberAfPluginDoorLockUserInfo & u

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,adjustedIndex=%hu,name=\"%.*s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u,"
"[endpoint=%d,adjustedIndex=%hu,name=\"%s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
mEndpointId, adjustedUserIndex, static_cast<int>(user.userName.size()), user.userName.data(),
mEndpointId, adjustedUserIndex, chip::NullTerminated(user.userName).c_str(),
static_cast<unsigned int>(user.credentials.size()), user.userUniqueId, to_underlying(user.userType),
to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

Expand All @@ -114,14 +115,13 @@ bool LockEndpoint::SetUser(uint16_t userIndex, chip::FabricIndex creator, chip::
const chip::CharSpan & userName, uint32_t uniqueId, UserStatusEnum userStatus, UserTypeEnum usertype,
CredentialRuleEnum credentialRule, const CredentialStruct * credentials, size_t totalCredentials)
{
ChipLogProgress(Zcl,
"Lock App: LockEndpoint::SetUser "
"[endpoint=%d,userIndex=%u,creator=%d,modifier=%d,userName=\"%.*s\",uniqueId=%" PRIx32
",userStatus=%u,userType=%u,"
"credentialRule=%u,credentials=%p,totalCredentials=%u]",
mEndpointId, userIndex, creator, modifier, static_cast<int>(userName.size()), userName.data(), uniqueId,
to_underlying(userStatus), to_underlying(usertype), to_underlying(credentialRule), credentials,
static_cast<unsigned int>(totalCredentials));
ChipLogProgress(
Zcl,
"Lock App: LockEndpoint::SetUser "
"[endpoint=%d,userIndex=%u,creator=%d,modifier=%d,userName=\"%s\",uniqueId=%" PRIx32 ",userStatus=%u,userType=%u,"
"credentialRule=%u,credentials=%p,totalCredentials=%u]",
mEndpointId, userIndex, creator, modifier, chip::NullTerminated(userName).c_str(), uniqueId, to_underlying(userStatus),
to_underlying(usertype), to_underlying(credentialRule), credentials, static_cast<unsigned int>(totalCredentials));

auto adjustedUserIndex = static_cast<uint16_t>(userIndex - 1);
if (adjustedUserIndex > mLockUsers.size())
Expand Down
3 changes: 2 additions & 1 deletion examples/lock-app/qpg/src/BoltLockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ bool BoltLockManager::ValidatePIN(const Optional<ByteSpan> & pinCode, OperationE
{
return true;
}
ChipLogProgress(Zcl, "ValidatePIN %.*s", static_cast<int>(pinCode.Value().size()), pinCode.Value().data());
ChipLogProgress(Zcl, "ValidatePIN %s",
NullTerminated(Uint8::to_const_char(pinCode.Value().data()), pinCode.Value().size()).c_str());

// Check the PIN code
for (const auto & credential : mCredentials)
Expand Down
7 changes: 3 additions & 4 deletions examples/lock-app/silabs/src/LockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,11 +433,10 @@ bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, Ember

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"[endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(),
user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy,
user.lastModifiedBy);
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

return true;
}
Expand Down
7 changes: 3 additions & 4 deletions examples/lock-app/telink/src/LockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,10 @@ bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, Ember

ChipLogProgress(Zcl,
"Found occupied user "
"[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u,"
"[endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%x,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(),
user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy,
user.lastModifiedBy);
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);
return true;
}

Expand Down
7 changes: 3 additions & 4 deletions examples/lock-app/ti/cc13x4_26x4/src/LockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,10 @@ bool LockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, Ember

ChipLogDetail(Zcl,
"Found occupied user "
"[endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"[endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%lx,type=%u,credentialRule=%u,"
"createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(),
user.userUniqueId, to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy,
user.lastModifiedBy);
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

return true;
}
Expand Down
5 changes: 2 additions & 3 deletions examples/ota-requestor-app/mbed/main/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,9 +470,8 @@ void AppTask::FunctionTimerEventHandler(AppEvent * aEvent)
bool AppTask::OnUpdateAvailableHandler(void * context, uint32_t softwareVersion, chip::CharSpan softwareVersionString)
{
AppTask * appTask = reinterpret_cast<AppTask *>(context);
ChipLogProgress(NotSpecified, "\tNew update available: \t %.*s [%d]", static_cast<int>(softwareVersionString.size()),
softwareVersionString.data(), softwareVersion);

ChipLogProgress(NotSpecified, "\tNew update available: \t %s [%d]", NullTerminated(softwareVersionString).c_str(),
softwareVersion);
ChipLogProgress(NotSpecified, "\tDo you want to download new update?");
ChipLogProgress(NotSpecified, "\tRespond by pressing the button");
ChipLogProgress(NotSpecified, "\t%10s%10s", "BUTTON0", "BUTTON1");
Expand Down
4 changes: 2 additions & 2 deletions examples/platform/esp32/lock/BoltLockManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ bool BoltLockManager::GetUser(chip::EndpointId endpointId, uint16_t userIndex, E
user.lastModifiedBy = userInDb.lastModifiedBy;

ESP_LOGI(TAG,
"Found occupied user [endpoint=%d,name=\"%.*s\",credentialsCount=%u,uniqueId=%" PRIu32
"Found occupied user [endpoint=%d,name=\"%s\",credentialsCount=%u,uniqueId=%" PRIu32
",type=%u,credentialRule=%u,createdBy=%d,lastModifiedBy=%d]",
endpointId, static_cast<int>(user.userName.size()), user.userName.data(), user.credentials.size(), user.userUniqueId,
endpointId, NullTerminated(user.userName).c_str(), user.credentials.size(), user.userUniqueId,
to_underlying(user.userType), to_underlying(user.credentialRule), user.createdBy, user.lastModifiedBy);

return true;
Expand Down
4 changes: 2 additions & 2 deletions examples/tv-casting-app/APIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -1301,8 +1301,8 @@ void InvokeContentLauncherLaunchURL(matter::casting::memory::Strong<matter::cast
launchURLCommand->Invoke(
request, nullptr,
[](void * context, const chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type::ResponseType & response) {
ChipLogProgress(AppServer, "LaunchURL Success with response.data: %.*s", static_cast<int>(response.data.Value().size()),
response.data.Value().data());
ChipLogProgress(AppServer, "LaunchURL Success with response.data: %s",
chip::NullTerminated(response.data.Value()).c_str());
},
[](void * context, CHIP_ERROR error) {
ChipLogError(AppServer, "LaunchURL Failure with err %" CHIP_ERROR_FORMAT, error.Format());
Expand Down
Loading
Loading
0