-
Notifications
You must be signed in to change notification settings - Fork 8
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
[easy] Address some compilation warnings #178
Conversation
@@ -22,7 +22,6 @@ namespace core { | |||
|
|||
ParserExtensionParseResult duckpgq_parse(ParserExtensionInfo *info, | |||
const std::string &query) { | |||
auto parse_info = (DuckPGQParserExtensionInfo &)(info); |
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.
Variable not used anywhere.
@@ -42,7 +42,7 @@ static void LocalClusteringCoefficientFunction(DataChunk &args, | |||
|
|||
DuckPGQBitmap neighbors(v_size); | |||
|
|||
for (int32_t n = 0; n < args.size(); n++) { | |||
for (idx_t n = 0; n < args.size(); n++) { |
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.
/home/ubuntu/duckpgq-extension/src/core/functions/scalar/local_clustering_coefficient.cpp:45:25: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘duckdb::idx_t’ {aka ‘long unsigned int’} [-Wsign-compare]
45 | for (int32_t n = 0; n < args.size(); n++) {
| ~~^~~~~~~~~~~~~
@@ -54,15 +54,15 @@ static void LocalClusteringCoefficientFunction(DataChunk &args, | |||
continue; | |||
} | |||
neighbors.reset(); | |||
for (size_t offset = v[src_node]; offset < v[src_node + 1]; offset++) { | |||
for (int64_t offset = v[src_node]; offset < v[src_node + 1]; offset++) { |
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.
**/home/ubuntu/duckpgq-extension/src/core/functions/scalar/local_clustering_coefficient.cpp:57:46: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int64_t’ {aka ‘long int’} [-Wsign-compare]
57 | for (size_t offset = v[src_node]; offset < v[src_node + 1]; offset++) {
| ~~~~~~~^~~~~~~~~~~~~~~~~**
Thanks for the PR! |
Searching through the codebase, it's actually used in one place:
which seems be a necessary field for May I double confirm if it's completely removable? |
I commented out the struct and any uses, and all tests passed; however, maybe it's best to just leave it in anyway. Sorry for the confusion |
Thank you for spending time taking a look for me! |
Met some warnings during compilation, this PR fix them all.
Most of the warning here are caused by comparison between signed and unsigned integers.