-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix Coverity issues #12465
Fix Coverity issues #12465
Conversation
Please add "Coverity issues" to the PR title not just numbers. It does not have to include the numbers in the title, can have them in the description. |
src/ds/ds-motion-common.cpp
Outdated
auto st = p->get_stream_type(); | ||
|
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.
Better to perform the check immediately after the cast.
- locality - easier to see the connection
- efficiency - not performing needless operation in case of failure
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.
I will learn it. Fixed.
src/gl/upload.cpp
Outdated
@@ -77,6 +77,10 @@ namespace librealsense | |||
auto gf = dynamic_cast<gpu_addon_interface*>((frame_interface*)new_f.get()); | |||
|
|||
uint32_t output_yuv; | |||
|
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.
Same, success checks should be right after the action.
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.
Fixed too.
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.
Looks great, just some minor comments :-)
No description provided.