You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2022/06/18 15:31:49 UTC
[GitHub] [couchdb] jaydoane opened a new pull request, #4071: Compiler warnings fixes
jaydoane opened a new pull request, #4071:
URL: https://github.com/apache/couchdb/pull/4071
<!-- Thank you for your contribution!
Please file this form by replacing the Markdown comments
with your text. If a section needs no action - remove it.
Also remember, that CouchDB uses the Review-Then-Commit (RTC) model
of code collaboration. Positive feedback is represented +1 from committers
and negative is a -1. The -1 also means veto, and needs to be addressed
to proceed. Once there are no objections, the PR can be merged by a
CouchDB committer.
See: http://couchdb.apache.org/bylaws.html#decisions for more info. -->
## Overview
Fix miscellaneous compiler warnings.
<!-- Please give a short brief for the pull request,
what problem it solves or how it makes things better. -->
## Testing recommendations
```
make eunit
```
<!-- Describe how we can test your changes.
Does it provides any behaviour that the end users
could notice? -->
## Related Issues or Pull Requests
<!-- If your changes affects multiple components in different
repositories please put links to those issues or pull requests here. -->
## Checklist
- [x] Code is written and works correctly
- [x] Changes are covered by tests
- [ ] Any new configurable parameters are documented in `rel/overlay/etc/default.ini`
- [ ] A PR for documentation changes has been made in https://github.com/apache/couchdb-documentation
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] jaydoane merged pull request #4071: Compiler warning fixes
Posted by GitBox <gi...@apache.org>.
jaydoane merged PR #4071:
URL: https://github.com/apache/couchdb/pull/4071
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] jaydoane commented on a diff in pull request #4071: Compiler warnings fixes
Posted by GitBox <gi...@apache.org>.
jaydoane commented on code in PR #4071:
URL: https://github.com/apache/couchdb/pull/4071#discussion_r900982686
##########
src/couch/src/couch_app.erl:
##########
@@ -14,8 +14,6 @@
-behaviour(application).
--include_lib("couch/include/couch_db.hrl").
-
Review Comment:
Same. I really didn't want to open every file individually.
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] nickva commented on a diff in pull request #4071: Compiler warnings fixes
Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #4071:
URL: https://github.com/apache/couchdb/pull/4071#discussion_r900976218
##########
src/mem3/src/mem3.erl:
##########
@@ -323,8 +323,8 @@ range(#ordered_shard{range = Range}) ->
Range;
range(<<"shards/", Start:8/binary, "-", End:8/binary, "/", _/binary>>) ->
[
- httpd_util:hexlist_to_integer(binary_to_list(Start)),
- httpd_util:hexlist_to_integer(binary_to_list(End))
+ list_to_integer(binary_to_list(Start), 16),
Review Comment:
We could even go a tiny bit faster by using `binary_to_integer/2`
```
./erlperf 'httpd_util:hexlist_to_integer(binary_to_list(<<"abc123def980">>)).' 'binary_to_integer(<<"abc123def980">>, 16).' --samples 10 --warmup 2
Code || QPS Time Rel
binary_to_integer(<<"abc123def980">>, 16). 1 28289 Ki 35 ns 100%
httpd_util:hexlist_to_integer(binary_to_list(<<"abc123def980">>)). 1 20880 Ki 47 ns 73%
```
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] nickva commented on a diff in pull request #4071: Compiler warnings fixes
Posted by GitBox <gi...@apache.org>.
nickva commented on code in PR #4071:
URL: https://github.com/apache/couchdb/pull/4071#discussion_r900977550
##########
src/couch/src/couch_app.erl:
##########
@@ -14,8 +14,6 @@
-behaviour(application).
--include_lib("couch/include/couch_db.hrl").
-
Review Comment:
Nice! I've been seeing various "header not used" warnings from erlang_ls in emacs but short of opening every module I couldn't figure out a way to performing a scan for the whole project at once.
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [couchdb] jaydoane commented on a diff in pull request #4071: Compiler warnings fixes
Posted by GitBox <gi...@apache.org>.
jaydoane commented on code in PR #4071:
URL: https://github.com/apache/couchdb/pull/4071#discussion_r900982206
##########
src/mem3/src/mem3.erl:
##########
@@ -323,8 +323,8 @@ range(#ordered_shard{range = Range}) ->
Range;
range(<<"shards/", Start:8/binary, "-", End:8/binary, "/", _/binary>>) ->
[
- httpd_util:hexlist_to_integer(binary_to_list(Start)),
- httpd_util:hexlist_to_integer(binary_to_list(End))
+ list_to_integer(binary_to_list(Start), 16),
Review Comment:
Oh cool! Will update.
--
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: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org