Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fixed coverity issues in src/acl_kernel_if.cpp #220

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

haoxian2
Copy link
Contributor

@haoxian2 haoxian2 commented Dec 5, 2022

Fixed coverity issue in acl_kernel_if.cpp: Type: Invalid type in argument to printf format specifier (PRINTF_ARGS)

  1. Used std::optional::value() and some pointer dereferencing to obtain the value of the argument to printf.
  2. Used %zu instead of %d to print out unsigned long types (size_t mostly)

Coverity issue in acl_kernel_if.cpp: Type: Reliance on integer endianness (INCOMPATIBLE_CAST)
Discussed in #226 instead.

@haoxian2 haoxian2 force-pushed the coverity-acl-kernel-if branch 2 times, most recently from 0c2f83e to 665e419 Compare December 5, 2022 20:59
Copy link
Contributor

@pcolberg pcolberg left a comment

Choose a reason for hiding this comment

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

Thanks @haoxian2, great progress!

src/acl_kernel_if.cpp Outdated Show resolved Hide resolved
src/acl_kernel_if.cpp Outdated Show resolved Hide resolved
src/acl_kernel_if.cpp Outdated Show resolved Hide resolved
src/acl_kernel_if.cpp Show resolved Hide resolved
src/acl_kernel_if.cpp Outdated Show resolved Hide resolved
src/acl_kernel_if.cpp Outdated Show resolved Hide resolved
@haoxian2 haoxian2 force-pushed the coverity-acl-kernel-if branch 3 times, most recently from f6957ff to 289cbd8 Compare December 6, 2022 21:58
@pcolberg pcolberg added the bug Something isn't working label Dec 7, 2022
@pcolberg pcolberg added this to the 2023.1 milestone Dec 7, 2022
src/acl_kernel_if.cpp Outdated Show resolved Hide resolved
…ment to printf format specifier (PRINTF_ARGS)

1. Used std::optional::value() and some pointer dereferencing to obtain the value of the argument to printf.
2. Used %zu instead of %d to print out unsigned long types (size_t mostly)
Copy link
Contributor

@pcolberg pcolberg left a comment

Choose a reason for hiding this comment

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

Thanks @haoxian2!

@pcolberg pcolberg merged commit 22226db into intel:main Dec 8, 2022
@haoxian2 haoxian2 deleted the coverity-acl-kernel-if branch December 8, 2022 20:14
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants