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

2 * field not copied in copy constructor ? #125

Open
dcb314 opened this issue Sep 15, 2022 · 1 comment
Open

2 * field not copied in copy constructor ? #125

dcb314 opened this issue Sep 15, 2022 · 1 comment

Comments

@dcb314
Copy link

dcb314 commented Sep 15, 2022

ncCompoundType.cpp:44:17: warning: Member variable 'NcCompoundType::myOffset' is not initialized in the
copy constructor. [uninitMemberVar]

ncType.cpp:36:9: warning: Member variable 'NcType::g_fileId' is not initialized in the copy constructor.
[uninitMemberVar]

@ZedThree
Copy link
Contributor

These are both unused private members and could be deleted entirely.

NcType::g_fileId looks like it was replaced by a global variable, g_ncid, to work round some issue -- I think because a type might be defined in a group, and a few functions need the file ID, and there's no existing method to get the file ID from a group ID. That is presumably possible to do by repeatedly getting the parent ID until hitting the root.

It looks like NcType can also be constructed from a "global type", and it seems like the C library has no way of getting a type's parent ID for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants