Skip to content

Commit

Permalink
Fix compile errors from TV example on Ubuntu x86-64 (#6914)
Browse files Browse the repository at this point in the history
* Fix compile errors from TV example on Ubuntu x86-64

* Update examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Update examples/tv-app/linux/include/target-navigator/TargetNavigatorManager.cpp

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Update examples/tv-app/linux/include/media-input/MediaInputManager.cpp

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Update examples/tv-app/linux/include/audio-output/AudioOutputManager.cpp

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Use int instead of uint_8/uint_16 as loop index

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jul 28, 2021
1 parent 5fc4394 commit 3276051
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ vector<EmberAfAudioOutputInfo> AudioOutputManager::proxyGetListOfAudioOutputInfo
int maximumVectorSize = 3;
char name[] = "exampleName";

for (uint8_t i = 0; i < maximumVectorSize; ++i)
for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfAudioOutputInfo audioOutputInfo;
audioOutputInfo.outputType = EMBER_ZCL_AUDIO_OUTPUT_TYPE_HDMI;
audioOutputInfo.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name));
audioOutputInfo.index = 1 + i;
audioOutputInfo.index = static_cast<uint8_t>(1 + i);
audioOutputInfos.push_back(audioOutputInfo);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ std::vector<EmberAfMediaInputInfo> MediaInputManager::proxyGetInputList()
char description[] = "exampleDescription";
char name[] = "exampleName";

for (uint8_t i = 0; i < maximumVectorSize; ++i)
for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfMediaInputInfo mediaInput;
mediaInput.description = chip::ByteSpan(chip::Uint8::from_char(description), sizeof(description));
mediaInput.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name));
mediaInput.inputType = EMBER_ZCL_MEDIA_INPUT_TYPE_HDMI;
mediaInput.index = 1 + i;
mediaInput.index = static_cast<uint8_t>(1 + i);
mediaInputList.push_back(mediaInput);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ std::vector<EmberAfNavigateTargetTargetInfo> TargetNavigatorManager::proxyGetTar
int maximumVectorSize = 2;
char name[] = "exampleName";

for (uint8_t i = 0; i < maximumVectorSize; ++i)
for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfNavigateTargetTargetInfo targetInfo;
targetInfo.name = chip::ByteSpan(chip::Uint8::from_char(name), sizeof(name));
targetInfo.identifier = 1 + i;
targetInfo.identifier = static_cast<uint8_t>(1 + i);
targets.push_back(targetInfo);
}

Expand Down
6 changes: 3 additions & 3 deletions examples/tv-app/linux/include/tv-channel/TvChannelManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ std::vector<EmberAfTvChannelInfo> TvChannelManager::proxyGetTvChannelList()
char callSign[] = "exampleCSign";
char name[] = "exampleName";

for (uint16_t i = 0; i < maximumVectorSize; ++i)
for (int i = 0; i < maximumVectorSize; ++i)
{
EmberAfTvChannelInfo channelInfo;
channelInfo.affiliateCallSign = ByteSpan(Uint8::from_char(affiliateCallSign), sizeof(affiliateCallSign));
channelInfo.callSign = ByteSpan(Uint8::from_char(callSign), sizeof(callSign));
channelInfo.name = ByteSpan(Uint8::from_char(name), sizeof(name));
channelInfo.majorNumber = 1 + i;
channelInfo.minorNumber = 2 + i;
channelInfo.majorNumber = static_cast<uint8_t>(1 + i);
channelInfo.minorNumber = static_cast<uint16_t>(2 + i);
tvChannels.push_back(channelInfo);
}

Expand Down

0 comments on commit 3276051

Please sign in to comment.