-
Notifications
You must be signed in to change notification settings - Fork 2
[DO NOT MERGE] Dummy PR to check coverity integration. #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,5 +1,5 @@ | ||||||||||||||||||||||||||
| /* | ||||||||||||||||||||||||||
| * If not stated otherwise in this file or this component's Licenses.txt file the | ||||||||||||||||||||||||||
|
Check failure on line 2 in source/MoCASsp/ssp_main.c
|
||||||||||||||||||||||||||
| * following copyright and licenses apply: | ||||||||||||||||||||||||||
| * | ||||||||||||||||||||||||||
| * Copyright 2016 RDK Management | ||||||||||||||||||||||||||
|
|
@@ -133,6 +133,10 @@ | |||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| funcNames = backtrace_symbols( tracePtrs, count ); | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| /* COVERITY_TEST_HIGH: NULL_RETURNS - Dereferencing funcNames before NULL check */ | ||||||||||||||||||||||||||
| /* This is an intentional Coverity test issue - backtrace_symbols may return NULL */ | ||||||||||||||||||||||||||
| printf("First trace: %s\n", funcNames[0]); | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| if ( funcNames ) { | ||||||||||||||||||||||||||
| // Print the stack trace | ||||||||||||||||||||||||||
|
Comment on lines
+137
to
141
|
||||||||||||||||||||||||||
| /* This is an intentional Coverity test issue - backtrace_symbols may return NULL */ | |
| printf("First trace: %s\n", funcNames[0]); | |
| if ( funcNames ) { | |
| // Print the stack trace | |
| /* This was previously an intentional Coverity test issue - backtrace_symbols may return NULL */ | |
| if ( funcNames ) { | |
| // Print the stack trace | |
| if (count > 0) { | |
| printf("First trace: %s\n", funcNames[0]); | |
| } |
Copilot
AI
Feb 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The unused_test_var assignments are dead stores (the variable is never read). This adds noise and may trigger compiler warnings; if this is only for static-analysis validation, consider guarding it behind a dedicated Coverity-test macro or removing it from production code paths.
| /* COVERITY_TEST_LOW: UNUSED_VALUE - Variable assigned but never used */ | |
| /* This is an intentional Coverity test issue - dead store */ | |
| int unused_test_var = 42; | |
| unused_test_var = 100; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverity Issue - Dereference before null check
Null-checking "funcNames" 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