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 illegal C++ use of reinterpret_cast<> to cast between nullptr_t and a pointer #180

Merged
merged 1 commit into from Jan 27, 2015

Conversation

ned14
Copy link

@ned14 ned14 commented Jan 27, 2015

The present usage of reinterpret_cast to cast a nullptr_t to a pointer generates an illegal C++ hard error in clang. This is correct, as per http://en.cppreference.com/w/cpp/language/reinterpret_cast the reinterpret_cast cast may not cast nullptr_t to any other pointer. This pull request replaces the cast with static_cast, which is the legal form of cast to use.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jan 27, 2015

This change looks good to me. It appears you haven't signed Google CLA though. Could you sign it following the link below?
https://cla.developers.google.com/about/google-individual

@ned14
Copy link
Author

ned14 commented Jan 27, 2015

Signed.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@ned14
Copy link
Author

ned14 commented Jan 27, 2015

To be honest googlebot you're beginning to annoy me now. I use a different email for everything, it makes spam management much easier. The email in git commits is intentionally invalid, so I cannot add it to any CLA.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented Jan 27, 2015

Thanks for the change :)

xfxyjwf added a commit that referenced this pull request Jan 27, 2015
Fix illegal C++ use of reinterpret_cast<> to cast between nullptr_t and a pointer
@xfxyjwf xfxyjwf merged commit 76cb776 into protocolbuffers:master Jan 27, 2015
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
Removed arena and reflective members like array type from upb_msg representation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants