RDKEMW-21898 : xr-voice-sdk - uninitialized scalar variable - #80
Merged
dwolaver merged 6 commits intoJul 23, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses uninitialized stack-variable warnings in the xr-voice-sdk C codebase (speech router + audio layers) by explicitly zero-initializing several structs, and adds a couple of defensive cleanup/error-handling improvements.
Changes:
- Zero-initialize multiple stack-allocated structs to avoid use of indeterminate padding/fields.
- Remove an unused/non-referenced logging helper from
xraudio_utils.c. - Improve failure-path handling in plugin/object creation and tighten capture file permissions.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/xr-speech-router/xrsr.c | Zero-initialize xraudio_input_format_t before populating fields for session requests. |
| src/xr-speech-router/xrsr_xraudio.c | Zero-initialize message/format/result structs; refactor keyword-result local variable initialization. |
| src/xr-audio/xraudio_utils.c | Remove xraudio_get_log_time (appears unused). |
| src/xr-audio/xraudio_thread.c | Zero-initialize xraudio_input_format_t used for capture format setup. |
| src/xr-audio/xraudio_private.h | Tighten capture file mode to user-only read/write. |
| src/xr-audio/xraudio_output.c | Add NULL checks and cleanup when EOS/OVC plugin object creation fails. |
| src/vsdk.c | Add dlclose(handle) on required HAL dlsym failure path. |
dwolaver
marked this pull request as ready for review
July 17, 2026 19:01
egalla204
approved these changes
Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.