Fix more cppcheck indicated duplicate inherited methods and members #3357
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.
There were several more cppcheck warnings in NML message type implementations where the update() method was duplicated in a derived class. This is fine because it cannot be virtual and the sub-class calls the base-class. This was also the case for the get_address() method.
A slightly more serious problem was indicated by cppcheck where there were duplicate inherited members. These are allocated and hide the other name. This PR prefixes the base-class member with '_' (underscore) and fixes the code to address the fallout. Removing the duplicate member, as for example the case with instances of 'spindle', are not an option because it would change the in-memory layout of the shared memory. Other name collisions, like 'type' or 'state' would cause the code to become non-functional if folded. The members must be present as each version has separate functionality.
The last few cppcheck duplicate inherited member warnings will be addressed in a separate PR.
The findings in NML so far do suggest that it may be wise to start thinking to modernize the code and maybe migrate libnml to libzmq (like for example suggested in #2722 and touched in #2803).