You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2023/01/10 05:18:23 UTC
[GitHub] [doris] BiteTheDDDDt opened a new pull request, #15760: [Chore](build) enable -Wextra and remove some -Wno
BiteTheDDDDt opened a new pull request, #15760:
URL: https://github.com/apache/doris/pull/15760
# Proposed changes
enable -Wextra and remove some -Wno
## Problem summary
Describe your changes.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [ ] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1380145442
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 36.64 seconds
load time: 496 seconds
storage size: 17123165845 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230112105109_clickbench_pr_78547.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt commented on a diff in pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #15760:
URL: https://github.com/apache/doris/pull/15760#discussion_r1065373248
##########
be/CMakeLists.txt:
##########
@@ -441,12 +441,13 @@ check_function_exists(sched_getcpu HAVE_SCHED_GETCPU)
# compiler flags that are common across debug/release builds
# -Wall: Enable all warnings.
-# -Wno-sign-compare: suppress warnings for comparison between signed and unsigned
# integers
# -pthread: enable multithreaded malloc
# -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG: enable nanosecond precision for boost
# -fno-omit-frame-pointers: Keep frame pointer for functions in register
-set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -pthread -Werror")
+set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -pthread -Werror")
Review Comment:
I tried pedantic, still many compilation warnings, maybe these can be done in other pr after
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1376755794
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] adonis0147 commented on a diff in pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
adonis0147 commented on code in PR #15760:
URL: https://github.com/apache/doris/pull/15760#discussion_r1065367886
##########
be/CMakeLists.txt:
##########
@@ -441,12 +441,13 @@ check_function_exists(sched_getcpu HAVE_SCHED_GETCPU)
# compiler flags that are common across debug/release builds
# -Wall: Enable all warnings.
-# -Wno-sign-compare: suppress warnings for comparison between signed and unsigned
# integers
# -pthread: enable multithreaded malloc
# -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG: enable nanosecond precision for boost
# -fno-omit-frame-pointers: Keep frame pointer for functions in register
-set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -pthread -Werror")
+set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -pthread -Werror")
Review Comment:
```suggestion
set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -pthread -Werror -pedantic")
```
##########
be/CMakeLists.txt:
##########
@@ -441,12 +441,13 @@ check_function_exists(sched_getcpu HAVE_SCHED_GETCPU)
# compiler flags that are common across debug/release builds
# -Wall: Enable all warnings.
-# -Wno-sign-compare: suppress warnings for comparison between signed and unsigned
# integers
# -pthread: enable multithreaded malloc
# -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG: enable nanosecond precision for boost
# -fno-omit-frame-pointers: Keep frame pointer for functions in register
-set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -pthread -Werror")
+set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -pthread -Werror")
Review Comment:
Can add an extra option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1381299968
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on a diff in pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on code in PR #15760:
URL: https://github.com/apache/doris/pull/15760#discussion_r1065343667
##########
be/src/exec/schema_scanner/schema_charsets_scanner.cpp:
##########
@@ -32,7 +32,7 @@ SchemaScanner::ColumnDesc SchemaCharsetsScanner::_s_css_columns[] = {
SchemaCharsetsScanner::CharsetStruct SchemaCharsetsScanner::_s_charsets[] = {
{"utf8", "utf8_general_ci", "UTF-8 Unicode", 3},
- {nullptr, nullptr, 0},
+ {nullptr, nullptr, 0, 0},
Review Comment:
warning: use nullptr [modernize-use-nullptr]
```suggestion
{nullptr, nullptr, nullptr, 0},
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1379922450
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1379795249
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1379776930
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] BiteTheDDDDt merged pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt merged PR #15760:
URL: https://github.com/apache/doris/pull/15760
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] adonis0147 commented on a diff in pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
adonis0147 commented on code in PR #15760:
URL: https://github.com/apache/doris/pull/15760#discussion_r1065376724
##########
be/CMakeLists.txt:
##########
@@ -441,12 +441,13 @@ check_function_exists(sched_getcpu HAVE_SCHED_GETCPU)
# compiler flags that are common across debug/release builds
# -Wall: Enable all warnings.
-# -Wno-sign-compare: suppress warnings for comparison between signed and unsigned
# integers
# -pthread: enable multithreaded malloc
# -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG: enable nanosecond precision for boost
# -fno-omit-frame-pointers: Keep frame pointer for functions in register
-set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -pthread -Werror")
+set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -pthread -Werror")
Review Comment:
> I tried pedantic, still many compilation warnings, maybe these can be done in other pr after
Okey, it is a great job.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] adonis0147 commented on a diff in pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
adonis0147 commented on code in PR #15760:
URL: https://github.com/apache/doris/pull/15760#discussion_r1065376724
##########
be/CMakeLists.txt:
##########
@@ -441,12 +441,13 @@ check_function_exists(sched_getcpu HAVE_SCHED_GETCPU)
# compiler flags that are common across debug/release builds
# -Wall: Enable all warnings.
-# -Wno-sign-compare: suppress warnings for comparison between signed and unsigned
# integers
# -pthread: enable multithreaded malloc
# -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG: enable nanosecond precision for boost
# -fno-omit-frame-pointers: Keep frame pointer for functions in register
-set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wno-sign-compare -pthread -Werror")
+set(CXX_COMMON_FLAGS "${CXX_COMMON_FLAGS} -Wall -Wextra -pthread -Werror")
Review Comment:
> I tried pedantic, still many compilation warnings, maybe these can be done in other pr after
Ok, it is a great job.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1379897841
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1379805068
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] adonis0147 commented on a diff in pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
adonis0147 commented on code in PR #15760:
URL: https://github.com/apache/doris/pull/15760#discussion_r1068863861
##########
be/src/util/bfd_parser.cpp:
##########
@@ -102,9 +102,11 @@ BfdParser* BfdParser::create() {
}
char prog_name[1024];
- // Ignore unused return value
- if (fscanf(file, "%1023s ", prog_name))
- ;
+
+ if (fscanf(file, "%1023s ", prog_name) != 1) {
+ return nullptr;
+ }
+
Review Comment:
Ditto.
##########
be/src/http/action/pprof_actions.cpp:
##########
@@ -228,9 +228,11 @@ void CmdlineAction::handle(HttpRequest* req) {
return;
}
char buf[1024];
- // Ignore unused return value
- if (fscanf(fp, "%1023s ", buf))
- ;
+
+ if (fscanf(fp, "%1023s ", buf) != 1) {
+ return;
+ }
+
Review Comment:
Maybe we should call `fclose` here, or use RAII to manage the `FILE` pointer.
##########
be/src/util/pprof_utils.cpp:
##########
@@ -66,9 +66,10 @@ Status PprofUtils::get_self_cmdline(std::string* cmd) {
return Status::InternalError("Unable to open file: /proc/self/cmdline");
}
char buf[1024];
- // Ignore unused return value
- if (fscanf(fp, "%1023s ", buf))
- ;
+
+ if (fscanf(fp, "%1023s ", buf) != 1) {
+ return Status::InternalError("get_self_cmdline read buffer failed");
+ }
Review Comment:
Ditto.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1382819604
clang-tidy review says "All clean, LGTM! :+1:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1382769532
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #15760: [Chore](build) enable -Wextra and remove some -Wno
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15760:
URL: https://github.com/apache/doris/pull/15760#issuecomment-1382769821
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org