In this codebase, you often check the return value of the implicated function when calling it, but in this instance, it appears that you didn’t. Using a consistent return value checking and/or error handling approach can improve code robustness and readability.
3 instances of this defect were found in the following locations:
In this codebase, you often check the return value of the implicated function when calling it, but in this instance, it appears that you didn’t. Using a consistent return value checking and/or error handling approach can improve code robustness and readability.
3 instances of this defect were found in the following locations:
Instance 1 File :
src/odb.c
Enclosing Function :git_odb__error_mismatch
Function :git_oid_tostr
https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/odb.c#L1550 Code extract:How can I fix it? Correct reference usage found in
src/diff_generate.c
at line1649
. https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/diff_generate.c#L1649 Code extract:Instance 2 File :
src/odb.c
Enclosing Function :git_odb__error_mismatch
Function :git_oid_tostr
https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/odb.c#L1551 Code extract:How can I fix it? Correct reference usage found in
src/diff_generate.c
at line1649
. https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/diff_generate.c#L1649 Code extract:Instance 3 File :
src/odb.c
Enclosing Function :git_odb__error_notfound
Function :git_oid_tostr
https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/odb.c#L1564 Code extract:How can I fix it? Correct reference usage found in
src/diff_generate.c
at line1649
. https://github.com/siva-msft/libgit2/blob/1e987525b3bd86fc29e7ff67d973861efd22faf7/src/diff_generate.c#L1649 Code extract: