Repository navigation
UCP/UCT/TEST/EXAMPLES: Fix several coverity issues. #6094
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 |
|---|---|---|
|
|
@@ -1211,7 +1211,7 @@ class test_uct_cm_sockaddr_stress : public test_uct_cm_sockaddr { | |
| int index; | ||
|
|
||
| index = get_ep_index(ep); | ||
| ASSERT_GE(index, 0); | ||
| ASSERT_TRUE(index >= 0); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you see this warning since different signedness?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. later on in this function index is used to access a field in an array, so therefore it can't be a negative value. |
||
| EXPECT_LT(index, (2 * m_clients_num)); | ||
|
|
||
| pthread_mutex_lock(&m_lock); | ||
|
|
||
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.
can we add exit() after raise() instead, since exit() has noreturn attribute
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.
with exit(1) to indicate an error happened?
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.
yes