-
Notifications
You must be signed in to change notification settings - Fork 94
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
cmake: enable Wextra #2542
cmake: enable Wextra #2542
Conversation
cce53ae
to
040902f
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2542 +/- ##
=======================================
Coverage 92.85% 92.85%
=======================================
Files 1025 1025
Lines 38338 38323 -15
=======================================
- Hits 35598 35585 -13
+ Misses 2740 2738 -2 ☔ View full report in Codecov by Sentry. |
src/common/arrow/arrow_row_batch.cpp
Outdated
@@ -256,7 +256,7 @@ void ArrowRowBatch::templateCopyNonNullValue<LogicalTypeID::VAR_LIST>( | |||
auto numBytesForChildValidity = getNumBytesForBits(numChildElements); | |||
vector->childData[0]->validity.resize(numBytesForChildValidity); | |||
// Initialize validity mask which is used to mark each value is valid (non-null) or not (null). | |||
for (auto i = currentNumBytesForChildValidity; i < numBytesForChildValidity; i++) { | |||
for (int64_t i = currentNumBytesForChildValidity; i < numBytesForChildValidity; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am a little confused here. What is the warning message we got before? I think numBytesForChildValidity is a uint type, why do we make i as int64_t rather than uint64_t?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
numBytesForChildValidity
is a int64_t
.
@@ -104,8 +104,9 @@ void PyConnection::getAllEdgesForTorchGeometric(py::array_t<int64_t>& npArray, | |||
auto dstBuffer = buffer + numRels; | |||
for (int64_t batch = 0; batch < batches; ++batch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the batch number must be a non-negative number, should we make it an unsigned int?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably - I've made a small edit to address this, and added a comment for why start and end are int64_t.
Primarily these warnings fall into two categories: - Unused parameter (that clang-tidy didn't catch). - Mismatch sign comparison. Generally this happens in loops, and the correct fix is `auto i = 0u`. This gives `i` the type of `unsigned`, and so we must be careful that `i` cannot overflow 2^32. Wextra is disabled when building third_party code.
Primarily these warnings fall into two categories:
auto i = 0u
. This givesi
the type ofunsigned
, and so we must be careful thati
cannot overflow 2^32.Wextra is disabled when building third_party code.