Skip to content

Commit a7044a0

Browse files
Jerry-ESPmwswartwout
authored andcommitted
fix compile error for -Wconversion added from PR #25373 (#25822)
1 parent 46234aa commit a7044a0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/platform/ESP32/ESP32DeviceInfoProvider.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,15 @@ bool ESP32DeviceInfoProvider::FixedLabelIteratorImpl::Next(FixedLabelType & outp
7171
memset(mFixedLabelNameBuf, 0, sizeof(mFixedLabelNameBuf));
7272
memset(mFixedLabelValueBuf, 0, sizeof(mFixedLabelValueBuf));
7373

74-
VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelKey(keyBuf, sizeof(keyBuf), mEndpoint, mIndex) == CHIP_NO_ERROR,
75-
false);
74+
VerifyOrReturnValue(
75+
ESP32Config::KeyAllocator::FixedLabelKey(keyBuf, sizeof(keyBuf), mEndpoint, static_cast<uint16_t>(mIndex)) == CHIP_NO_ERROR,
76+
false);
7677
ESP32Config::Key keyKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf);
7778
VerifyOrReturnValue(
7879
ESP32Config::ReadConfigValueStr(keyKey, mFixedLabelNameBuf, sizeof(mFixedLabelNameBuf), keyOutLen) == CHIP_NO_ERROR, false);
7980

80-
VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelValue(keyBuf, sizeof(keyBuf), mEndpoint, mIndex) == CHIP_NO_ERROR,
81+
VerifyOrReturnValue(ESP32Config::KeyAllocator::FixedLabelValue(keyBuf, sizeof(keyBuf), mEndpoint,
82+
static_cast<uint16_t>(mIndex)) == CHIP_NO_ERROR,
8183
false);
8284
ESP32Config::Key valueKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf);
8385
VerifyOrReturnValue(ESP32Config::ReadConfigValueStr(valueKey, mFixedLabelValueBuf, sizeof(mFixedLabelValueBuf), valueOutLen) ==
@@ -210,7 +212,8 @@ bool ESP32DeviceInfoProvider::SupportedLocalesIteratorImpl::Next(CharSpan & outp
210212
size_t keyOutLen = 0;
211213
memset(mLocaleBuf, 0, sizeof(mLocaleBuf));
212214

213-
VerifyOrReturnValue(ESP32Config::KeyAllocator::Locale(keyBuf, sizeof(keyBuf), mIndex) == CHIP_NO_ERROR, false);
215+
VerifyOrReturnValue(ESP32Config::KeyAllocator::Locale(keyBuf, sizeof(keyBuf), static_cast<uint16_t>(mIndex)) == CHIP_NO_ERROR,
216+
false);
214217
ESP32Config::Key keyKey(ESP32Config::kConfigNamespace_ChipFactory, keyBuf);
215218
VerifyOrReturnValue(ESP32Config::ReadConfigValueStr(keyKey, mLocaleBuf, sizeof(mLocaleBuf), keyOutLen) == CHIP_NO_ERROR, false);
216219

0 commit comments

Comments
 (0)