Skip to content

Commit

Permalink
fix compile error for -Wconversion added from PR #25373 (#25822)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry-ESP authored and pull[bot] committed Aug 4, 2023
1 parent ba9b380 commit 2888cd4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/platform/ESP32/ESP32DeviceInfoProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ bool ESP32DeviceInfoProvider::FixedLabelIteratorImpl::Next(FixedLabelType & outp
memset(mFixedLabelNameBuf, 0, sizeof(mFixedLabelNameBuf));
memset(mFixedLabelValueBuf, 0, sizeof(mFixedLabelValueBuf));

VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelKey(keyBuf, sizeof(keyBuf), mEndpoint, mIndex) == CHIP_NO_ERROR,
false);
VerifyOrReturnValue(
ESP32Config::KeyAllocator::FixedLabelKey(keyBuf, sizeof(keyBuf), mEndpoint, static_cast<uint16_t>(mIndex)) == CHIP_NO_ERROR,
false);
ESP32Config::Key keyKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf);
VerifyOrReturnValue(
ESP32Config::ReadConfigValueStr(keyKey, mFixedLabelNameBuf, sizeof(mFixedLabelNameBuf), keyOutLen) == CHIP_NO_ERROR, false);

VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelValue(keyBuf, sizeof(keyBuf), mEndpoint, mIndex) == CHIP_NO_ERROR,
VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelValue(keyBuf, sizeof(keyBuf), mEndpoint,
static_cast<uint16_t>(mIndex)) == CHIP_NO_ERROR,
false);
ESP32Config::Key valueKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf);
VerifyOrReturnValue(ESP32Config::ReadConfigValueStr(valueKey, mFixedLabelValueBuf, sizeof(mFixedLabelValueBuf), valueOutLen) ==
Expand Down Expand Up @@ -210,7 +212,8 @@ bool ESP32DeviceInfoProvider::SupportedLocalesIteratorImpl::Next(CharSpan & outp
size_t keyOutLen = 0;
memset(mLocaleBuf, 0, sizeof(mLocaleBuf));

VerifyOrReturnValue(ESP32Config::KeyAllocator::Locale(keyBuf, sizeof(keyBuf), mIndex) == CHIP_NO_ERROR, false);
VerifyOrReturnValue(ESP32Config::KeyAllocator::Locale(keyBuf, sizeof(keyBuf), static_cast<uint16_t>(mIndex)) == CHIP_NO_ERROR,
false);
ESP32Config::Key keyKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf);
VerifyOrReturnValue(ESP32Config::ReadConfigValueStr(keyKey, mLocaleBuf, sizeof(mLocaleBuf), keyOutLen) == CHIP_NO_ERROR, false);

Expand Down

0 comments on commit 2888cd4

Please sign in to comment.