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

Fix MediaSDK_C2 Coverity issues #88

Open
wants to merge 1 commit into
base: celadon/s/mr0/stable
Choose a base branch
from

Conversation

Kexiaox
Copy link
Contributor

@Kexiaox Kexiaox commented Mar 27, 2023

issues summary: Uncheck return; self assign; pass nullpointer;

@Kexiaox Kexiaox force-pushed the FixCoverityIssues branch 5 times, most recently from 66c18e5 to 23f1d29 Compare March 29, 2023 05:31
}
catch(const std::exception& e)
{
std::cerr << e.what() << '\n';
Copy link
Contributor

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

}
catch(const std::exception& e)
{
std::cerr << e.what() << '\n';
Copy link
Contributor

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

@@ -22,6 +22,7 @@

#include <C2Work.h>

#include <iostream>
Copy link
Contributor

@zhangyichix zhangyichix Mar 29, 2023

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.

@@ -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
Copy link
Contributor

@zhangyichix zhangyichix Mar 29, 2023

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

Copy link
Contributor

@zhangyichix zhangyichix left a 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.

@Kexiaox Kexiaox force-pushed the FixCoverityIssues branch 3 times, most recently from fab75e1 to 3468bc5 Compare March 29, 2023 07:02
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]>
@Kexiaox
Copy link
Contributor Author

Kexiaox commented Mar 30, 2023

Hi @dyang23 @TianmiChen @zhangyichix I have updated PR, please help review

@sysopenci sysopenci added the Stale Stale label for inactive open prs label Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR approved Stale Stale label for inactive open prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants