Skip to content

Fix reinterpret cast warning of unsigned to void* in Metdata.h #6814

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

Merged
merged 1 commit into from
Jan 14, 2017
Merged

Fix reinterpret cast warning of unsigned to void* in Metdata.h #6814

merged 1 commit into from
Jan 14, 2017

Conversation

hughbe
Copy link
Contributor

@hughbe hughbe commented Jan 14, 2017

warning C4312: 'reinterpret_cast': conversion from 'unsigned int' to 'void *' of greater size

Instead, use uintptr_t, since this should be the size of void *

@gparker42
Copy link
Contributor

Looks good. I was suspicious about using uintptr_t instead of intptr_t because index is signed, but swift_getFunctionPointerExtraInhabitantIndex also uses uintptr_t and clearly does not want sign extension.

@gparker42
Copy link
Contributor

@swift-ci please smoke test

@hughbe hughbe changed the title Fix reinterpret cast warning sof unsigned to void* in Metdata.h Fix reinterpret cast warning of unsigned to void* in Metdata.h Jan 14, 2017
@gparker42 gparker42 merged commit 42a7ff6 into swiftlang:master Jan 14, 2017
@hughbe hughbe deleted the metadata-conversion branch January 14, 2017 20:35
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