-
Notifications
You must be signed in to change notification settings - Fork 71
acl_device_binary: fix missing assignment operator #207
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- cov-errors-33ef809.txt
+++ cov-errors-aebf33b.txt
@@ -1,79 +1,3 @@
-include/acl_device_binary.h:25:7:
- Type: Missing assignment operator (MISSING_COPY_OR_ASSIGN)
-
-include/acl_device_binary.h:25:7:
- missing_assign: Class "acl_device_binary_t" owns resources that are freed in its destructor but has no user-written assignment operator.
-include/acl_device_binary.h:25:7:
- free_resource: The destructor frees member "m_binary_pkg".
-include/acl_device_binary.h:27:28:
- freed_arg: "unload_content" frees parameter "this->m_binary_pkg".
-src/acl_device_binary.cpp:136:3:
- path: Condition "this->m_binary_pkg", taking true branch.
-src/acl_device_binary.cpp:137:5:
- freed_arg: "acl_pkg_close_file" frees parameter "this->m_binary_pkg".
-lib/pkg_editor/src/pkg_editor.c:1099:3:
- path: Condition "!pkg", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1114:3:
- path: Condition "pkg->writable", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1116:5:
- path: Condition "data", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1121:3:
- path: Condition "elf_end(pkg->elf)", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1122:5:
- path: Condition "pkg->show_info", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1124:3:
- path: Jumping back to the beginning of the loop.
-lib/pkg_editor/src/pkg_editor.c:1121:3:
- path: Condition "elf_end(pkg->elf)", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1126:3:
- path: Condition "pkg->fd != -1", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1127:5:
- path: Condition "pkg->dirty", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1136:7:
- path: Condition "status != 0", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1144:5:
- path: Condition "status != 0", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1150:3:
- freed_arg: "free" frees parameter "pkg".
-
-include/acl_device_binary.h:25:7:
- Type: Missing copy constructor (MISSING_COPY_OR_ASSIGN)
-
-include/acl_device_binary.h:25:7:
- missing_copy_ctor: Class "acl_device_binary_t" owns resources that are freed in its destructor but has no user-written copy constructor.
-include/acl_device_binary.h:25:7:
- free_resource: The destructor frees member "m_binary_pkg".
-include/acl_device_binary.h:27:28:
- freed_arg: "unload_content" frees parameter "this->m_binary_pkg".
-src/acl_device_binary.cpp:136:3:
- path: Condition "this->m_binary_pkg", taking true branch.
-src/acl_device_binary.cpp:137:5:
- freed_arg: "acl_pkg_close_file" frees parameter "this->m_binary_pkg".
-lib/pkg_editor/src/pkg_editor.c:1099:3:
- path: Condition "!pkg", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1114:3:
- path: Condition "pkg->writable", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1116:5:
- path: Condition "data", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1121:3:
- path: Condition "elf_end(pkg->elf)", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1122:5:
- path: Condition "pkg->show_info", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1124:3:
- path: Jumping back to the beginning of the loop.
-lib/pkg_editor/src/pkg_editor.c:1121:3:
- path: Condition "elf_end(pkg->elf)", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1126:3:
- path: Condition "pkg->fd != -1", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1127:5:
- path: Condition "pkg->dirty", taking true branch.
-lib/pkg_editor/src/pkg_editor.c:1136:7:
- path: Condition "status != 0", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1144:5:
- path: Condition "status != 0", taking false branch.
-lib/pkg_editor/src/pkg_editor.c:1150:3:
- freed_arg: "free" frees parameter "pkg".
-
lib/CppUTest/include/CppUTest/CommandLineTestRunner.h:46:7:
Type: Missing assignment operator (MISSING_COPY_OR_ASSIGN) |
> Class "acl_device_binary_t" owns resources that are freed in its > destructor but has no user-written assignment operator. Signed-off-by: Peter Colberg <[email protected]>
Klocwork fails with false positive:
fpga-runtime-for-opencl/src/acl_device_program_info.cpp Lines 50 to 58 in 69df3e2
|
Superseded by #236 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Peter Colberg [email protected]