-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
clang-tidy: Apply fixes "google-readability-casting" #3034
Merged
mspang
merged 1 commit into
project-chip:master
from
mspang:for-chip/clang-tidy-google-readability-casting
Oct 6, 2020
Merged
clang-tidy: Apply fixes "google-readability-casting" #3034
mspang
merged 1 commit into
project-chip:master
from
mspang:for-chip/clang-tidy-google-readability-casting
Oct 6, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a74edbd
to
9546770
Compare
cd07b5d
to
5a79320
Compare
rwalker-apple
approved these changes
Oct 3, 2020
andy31415
approved these changes
Oct 5, 2020
saurabhst
approved these changes
Oct 5, 2020
@mspang conflicts |
5a79320
to
8d7803f
Compare
8d7803f
to
f1ea14e
Compare
mspang
added a commit
to mspang/connectedhomeip
that referenced
this pull request
Oct 6, 2020
Many C style casts remain after 181f076 ("clang-tidy: Apply fixes "google-readability-casting" (project-chip#3034)"). The reason they were not updated is typically because they are casting away const qualifiers. Fix these cases or add a const_cast<> if appropriate.
mspang
added a commit
to mspang/connectedhomeip
that referenced
this pull request
Oct 6, 2020
Many C style casts remain after 181f076 ("clang-tidy: Apply fixes "google-readability-casting" (project-chip#3034)"). The reason they were not updated is typically because they are casting away const qualifiers. Fix these cases or add a const_cast<> if appropriate.
bzbarsky-apple
pushed a commit
that referenced
this pull request
Oct 7, 2020
* Remove remaining Linux C-style casts & fix const correctness Many C style casts remain after 181f076 ("clang-tidy: Apply fixes "google-readability-casting" (#3034)"). The reason they were not updated is typically because they are casting away const qualifiers. Fix these cases or add a const_cast<> if appropriate. * Write ReadN(T*&) in terms of ReadN(const T*&) * Fix timer epochs * Remove casts around inet_ntop * Simplify casts around free * Simplify IPAddress * Remove casts around setsockopt * Remove cast from Spake2p "G" * Document cast around AES_CCM_decrypt * Add back const_cast around inet_ntop * Duplicate argv in TestCHIPArgParser * Revert "Duplicate argv in TestCHIPArgParser" This reverts commit ec2c119. * Restyle * Revert "Revert "Duplicate argv in TestCHIPArgParser"" This reverts commit 8defda3. * restyle * Add missing semicolon * Fix v4 conversions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
C-style casts are obsolete in C++, may allow stronger cast than intended including losing
const
qualifiers.Summary of Changes
Convert C style casts to C++ style casts.