Skip to content

Fixed coverity issues in src/acl_kernel_if.cpp #220

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

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 requested review from pcolberg and zibaiwan December 5, 2022 19:43
@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!

@haoxian2 haoxian2 force-pushed the coverity-acl-kernel-if branch 3 times, most recently from f6957ff to 289cbd8 Compare December 6, 2022 21:58
@haoxian2 haoxian2 requested a review from pcolberg December 6, 2022 22:31
@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
…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)
@haoxian2 haoxian2 force-pushed the coverity-acl-kernel-if branch from d1922e2 to 64ada5c Compare December 8, 2022 17:55
@haoxian2 haoxian2 requested a review from pcolberg December 8, 2022 17:56
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants