-
Notifications
You must be signed in to change notification settings - Fork 26
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 MediaSDK_C2 Coverity issues #88
base: celadon/s/mr0/stable
Are you sure you want to change the base?
Fix MediaSDK_C2 Coverity issues #88
Conversation
66c18e5
to
23f1d29
Compare
c2_utils/src/mfx_cmd_queue.cpp
Outdated
} | ||
catch(const std::exception& e) | ||
{ | ||
std::cerr << e.what() << '\n'; |
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.
std::cerr doesn't work on android, pls instead of ALOGE
c2_utils/include/mfx_pool.h
Outdated
} | ||
catch(const std::exception& e) | ||
{ | ||
std::cerr << e.what() << '\n'; |
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.
std::cerr doesn't work on android, pls instead of ALOGE
c2_utils/include/mfx_cmd_queue.h
Outdated
@@ -22,6 +22,7 @@ | |||
|
|||
#include <C2Work.h> | |||
|
|||
#include <iostream> |
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.
if using ALOGE instead of std::cerr, consider removing it.
c2_utils/src/mfx_c2_utils.cpp
Outdated
@@ -669,7 +669,7 @@ YUVWriter::YUVWriter(const std::string& dir, | |||
|
|||
if (!dir_exists) { | |||
MFX_DEBUG_TRACE_STREAM(NAMED(full_name.str())); | |||
mkdir(full_name.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); | |||
mkdir(full_name.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); //TODO Uncheck return vaule |
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.
if(mkdir(full_name.str().c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH)) {
MFX_DEBUG_TRACE_MSG("cannot create the path");
return;
}
If it returns 0 on success
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.
hi @Kexiaox I left messages where suggest to modify.
fab75e1
to
3468bc5
Compare
issues summary: Uncheck return vaule; self assign; pass nullpointer; Tracked-On: OAM-108581 Signed-off-by: Ke Xiao <[email protected]> Signed-off-by: Zhnang Yichi <[email protected]>
3468bc5
to
f8df2b6
Compare
Hi @dyang23 @TianmiChen @zhangyichix I have updated PR, please help review |
issues summary: Uncheck return; self assign; pass nullpointer;