Skip to content
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

Coverity changes in USBMSD.cpp #11452

Merged
merged 1 commit into from
Sep 18, 2019
Merged

Conversation

Tharazi97
Copy link
Contributor

Description

Added initialization of variables, so the coverity doesn't produce an error. The variables are later redefined by other functions like connect().

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

@jamesbeyond @maciejbocianski

Release Notes

@ciarmcom ciarmcom requested review from jamesbeyond, maciejbocianski and a team September 11, 2019 07:00
@ciarmcom
Copy link
Member

@Tharazi97, thank you for your changes.
@maciejbocianski @jamesbeyond @ARMmbed/mbed-os-core @ARMmbed/mbed-os-maintainers please review.

@hugueskamba
Copy link
Collaborator

@Tharazi97 Can you please add the exact text of the Coverity issue you are addressing in the description?

@Tharazi97
Copy link
Contributor Author

"uninit_member: Non-static class member _addr is not initialized in this constructor nor any functions that it calls.". Same for other variables.

Copy link
Collaborator

@hugueskamba hugueskamba left a comment

Choose a reason for hiding this comment

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

The module seems to adopt a pattern where simple member initialization in the member initializer list and more complex one in the _init(), init(), and connect() method.
Can you please move these initialization to the member initializer list for consistency?

Copy link
Collaborator

@hugueskamba hugueskamba left a comment

Choose a reason for hiding this comment

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

LGTM

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 18, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Sep 18, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants