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

Fix aliasing/type-pun problem in ncdump #353

Merged
merged 2 commits into from
Jan 24, 2017
Merged

Fix aliasing/type-pun problem in ncdump #353

merged 2 commits into from
Jan 24, 2017

Conversation

DennisHeimbigner
Copy link
Collaborator

re: e-support (XKJ-645277) and github issue #351.
A set of typecasts in the function
print_enum_type in ncdump/ncdump.c cause some
compilers to complain about type punning:
"warning: dereferencing type-punned pointer will
break strict-aliasing rules"

Fix is to cast to void* before casting to final
value. There may be other occurrences in some
of the older netcdf-c code.

DennisHeimbigner and others added 2 commits January 23, 2017 21:23
A set of typecasts in the function
print_enum_type in ncdump/ncdump.c cause some
compilers to complain about type punning:
warning: dereferencing type-punned pointer will
break strict-aliasing rules

Fix is to cast to void* before casting to final
value.  There may be other occurrences in some
of the older netcdf-c code.
@WardF WardF merged commit 45f2261 into master Jan 24, 2017
@DennisHeimbigner DennisHeimbigner deleted the alias.dmh branch November 7, 2017 22:56
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

Successfully merging this pull request may close these issues.

2 participants