Skip to content

Conversation

yuvaramachandran-gurusamy
Copy link
Contributor

RDKEMW-6230: Retry logic used dsGetHDMIARCPortId in HdmiCecSink

Signed-off-by: yuvaramachandran_gurusamy [email protected]

@yuvaramachandran-gurusamy yuvaramachandran-gurusamy requested a review from a team as a code owner July 23, 2025 04:34
@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Waiting while holding a lock

Call to "usleep" might sleep while holding lock "lock._M_device".

Medium Impact, CWE-667
SLEEP

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:3079

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Parse warning

type qualifier on return type is meaningless

Low Impact, CWE-398
PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:885

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Variable copied when it could be moved

"hdmiPort" is copied and then passed-by-reference as parameter to STL insertion function "std::vector<WPEFramework::Plugin::HdmiPortMap, std::allocatorWPEFramework::Plugin::HdmiPortMap >::push_back(std::vector<WPEFramework::Plugin::HdmiPortMap, std::allocatorWPEFramework::Plugin::HdmiPortMap >::value_type const &)", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

Use "std::move(""hdmiPort"")" instead of "hdmiPort".

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:800

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Uninitialized pointer field

Non-static class member "msgFrameListener" is not initialized in this constructor nor in any functions that it calls.

Medium Impact, CWE-457
UNINIT_CTOR

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:688

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Dereference before null check

Null-checking "this->smConnection" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.

Medium Impact, CWE-476
REVERSE_INULL

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:3047

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Variable copied when it could be moved

"audiodescriptor" is passed-by-value as parameter to "WPEFramework::Core::JSON::ArrayTypeWPEFramework::Core::JSON::Variant::ArrayType(WPEFramework::Core::JSON::ArrayTypeWPEFramework::Core::JSON::Variant const &)", when it could be moved instead.

Low Impact, CWE-none
COPY_INSTEAD_OF_MOVE

How to fix

Use "std::move(""audiodescriptor"")" instead of "audiodescriptor".

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:1085

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Data race condition

A wait is performed without a loop. If there is a spurious wakeup, the condition may not be satisfied. [Note: The source code implementation of the function has been overridden by a builtin model.]

Medium Impact, CWE-none
BAD_CHECK_OF_WAIT_COND

How to fix

Check the wait condition in a loop, with the lock held. The lock must not be released between the condition and the wait.

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:2939

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Uninitialized scalar variable

Using uninitialized value "hdmiPort". Field "hdmiPort.m_logicalAddr.impl" is uninitialized when calling "push_back". [Note: The source code implementation of the function has been overridden by a builtin model.]

High Impact, CWE-457
UNINIT

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:800

@rdkcmf-jenkins
Copy link
Contributor

Coverity Issue - Check of thread-shared field evades lock acquisition

Thread1 sets "m_currentArcRoutingState" to a new value. Now the two threads have an inconsistent view of "m_currentArcRoutingState" and updates to fields correlated with "m_currentArcRoutingState" may be lost.

High Impact, CWE-543
LOCK_EVASION

How to fix

Guard the modification of "m_currentArcRoutingState" and the read used to decide whether to modify "m_currentArcRoutingState" with the same set of locks.

Issue location

This issue was discovered outside the diff for this Pull Request. You can find it at:
HdmiCecSink/HdmiCecSink.cpp:1023

@suppal045 suppal045 merged commit 4b8146e into develop Jul 23, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants