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

Fixed coverity issue in acl_context.cpp #223

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

haoxian2
Copy link
Contributor

@haoxian2 haoxian2 commented Dec 7, 2022

Fixed coverity issue in acl_context.cpp: Type: AUTO_CAUSES_COPY (AUTO_CAUSES_COPY)

Changed to const cl_context _context since coverity complains about the previous code auto _context would make an auto copy of the pointer contexts in acl_platform.contexts_set.

@haoxian2 haoxian2 changed the title Fixed coverity issue in acl_context.cpp: Type: AUTO_CAUSES_COPY (AUTO_CAUSES_COPY) Fixed coverity issue in acl_context.cpp Dec 7, 2022
@haoxian2 haoxian2 requested review from pcolberg and zibaiwan December 7, 2022 14:42
@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
@haoxian2 haoxian2 requested a review from pcolberg December 7, 2022 21:11
@haoxian2 haoxian2 force-pushed the coverity-acl-context branch from 35b4fed to 25360b6 Compare December 8, 2022 15:39
…_CAUSES_COPY)

Changed to `const cl_context _context` since coverity complains about the previous code auto _context would make an auto copy of the pointer contexts in acl_platform.contexts_set. Because `_context` is a pointer, a copy is equally as cheap as a reference, and to pass coverity which only mentions `auto` copy.
@haoxian2 haoxian2 force-pushed the coverity-acl-context branch from 25360b6 to f3c6fd5 Compare December 8, 2022 17:16
@pcolberg pcolberg merged commit 6c00bd2 into intel:main Dec 8, 2022
@haoxian2 haoxian2 deleted the coverity-acl-context branch December 8, 2022 17:57
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