Skip to content

Coverity- Medium and low priority issues (#524) - #565

Merged
balasaraswathy-n merged 1 commit into
feature/RDKEMW-16516_1from
master
Jul 17, 2026
Merged

balasaraswathy-n merged 1 commit into
feature/RDKEMW-16516_1from
master

Conversation

@balasaraswathy-n

Copy link
Copy Markdown
Contributor

Summary: Fix for issues-AUTO_CAUSES_COPY, BAD_CHECK_OF_WAIT_COND, CHECKED_RETURN, COPY_INSTEAD_OF_MOVE, DEADCODE, PW.INCLUDE_RECURSION, PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE, UNCAUGHT_EXCEPT, UNINIT_CTOR Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-17769

Summary: Fix for issues-AUTO_CAUSES_COPY, BAD_CHECK_OF_WAIT_COND,
CHECKED_RETURN, COPY_INSTEAD_OF_MOVE, DEADCODE, PW.INCLUDE_RECURSION,
PW.USELESS_TYPE_QUALIFIER_ON_RETURN_TYPE, UNCAUGHT_EXCEPT, UNINIT_CTOR
Type: Fix
Test Plan: UT/CT, Fullstack
Jira: RDKEMW-17769
Copilot AI review requested due to automatic review settings July 17, 2026 10:38
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a collection of Coverity medium/low findings across the Rialto codebase, primarily by reducing unnecessary copies, improving condition-variable usage, and tightening error/return-value handling.

Changes:

  • Fixes potential missed/spurious wakeups in WebAudio buffer writing by switching to a predicate-based wait_for and adding a completion counter.
  • Removes unnecessary copies / useless const-on-return patterns (e.g., move from queue, pass shared_ptr by const-ref, avoid proto copies).
  • Improves robustness/observability around system lookups and GStreamer event handling (bounded buffers for getpwnam_r/getgrnam_r, check gstElementSendEvent return, add fatal error handling in sim main).

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
wrappers/source/OcdmSession.cpp Removes useless const on value return for key status conversion.
tests/unittests/media/server/gstplayer/webAudioPlayer/GstWebAudioPlayerTest.cpp Updates test helper to increment new write completion counter; adds include.
tests/componenttests/server/tests/webAudio/WebAudioTestMethods.cpp Clears SHM region after mapping to ensure deterministic initial state.
serverManager/service/source/ConfigReader.cpp Avoids shared_ptr copies by passing JSON root/wrappers by const-ref; formatting adjustments.
serverManager/service/include/ConfigReader.h Header signature updates to match const-ref parameter passing.
serverManager/serverManagerSim/RialtoServerManagerSim.cpp Wraps main logic in try/catch and returns non-zero on fatal errors.
serverManager/common/source/SessionServerAppManager.cpp Avoids copying app name by binding to const reference.
media/server/main/source/MainThread.cpp Moves task info out of queue instead of copying.
media/server/main/interface/IMainThread.h Removes erroneous self-include.
media/server/ipc/source/MediaPipelineModuleService.cpp Avoids copying codec data proto before extracting fields.
media/server/gstplayer/source/tasks/webAudio/WriteBuffer.cpp Increments completion counter under mutex on write completion.
media/server/gstplayer/source/GstWebAudioPlayer.cpp Uses predicate-based wait keyed off completion counter; fixes namespace closing.
media/server/gstplayer/source/GstGenericPlayer.cpp Fixes sync-off value assignment; checks and logs step-event send result.
media/server/gstplayer/include/WebAudioPlayerContext.h Adds writeCompletionCounter to support robust CV waiting.
media/public/include/IMediaPipeline.h Removes useless const qualifiers from value returns.
ipc/common/source/NamedSocket.cpp Uses heap buffer for re-entrant lookups with fallback size; improves logging for “not found” cases.
common/source/LinuxUtils.cpp Same lookup-buffer hardening and logging improvements as NamedSocket.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 23 to 25
#include "WebAudioUtil.h"
#include <chrono>
#include <thread>
@balasaraswathy-n
balasaraswathy-n merged commit 523f9ed into feature/RDKEMW-16516_1 Jul 17, 2026
33 of 34 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2026

This branch was previously deployed

1 inactive deployment
github-pages — bb0058e4 Deployed Jul 15, 2026 by DouglasAdler via deploy #436
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants