10000 Uninitialized data member in test code · Issue #1444 · uxlfoundation/oneTBB · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Uninitialized data member in test code #1444
Open
@jwakely

Description

@jwakely

https://github.com/oneapi-src/oneTBB/blob/1f52f5093ec7ce23829fe64ab82ac5541fea42ee/test/conformance/conformance_flowgraph.h#L335-L351

If I'm reading this correctly, the copy constructor does not initialize copies_count. That means if you make a copy of a copy, the new object will do ++other.copies_count; on an uninitialized variable.

Is there any reason not to initialize copies_count to zero here?

Using default member initializers for all four data members seems sensible.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0