You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Volodymyr Verovkin (Code Review)" <ge...@cloudera.org> on 2020/04/24 01:11:18 UTC
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Volodymyr Verovkin has uploaded this change for review. ( http://gerrit.cloudera.org:8080/15795
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
[warning] Fixed GCC warning "control reaches end of non-void function"
GCC 7.5 on Ubuntu 18 produced warning:
[194/827] Building CXX object src/kudu/util/CMakeFiles/kudu_util.dir/
net/sockaddr.cc.o
../../src/kudu/util/net/sockaddr.cc: In member function
‘std::__cxx11::string kudu::Sockaddr::UnixDomainPath() const’:
../../src/kudu/util/net/sockaddr.cc:152:1:
warning: control reaches end of non-void function [-Wreturn-type]
Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
---
M src/kudu/util/net/sockaddr.cc
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/95/15795/1
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 1
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Volodymyr Verovkin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Grant Henke, Bankim Bhavsar,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/15795
to look at the new patch set (#3).
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
[warning] Fixed GCC warning "control reaches end of non-void function"
GCC 7.5 on Ubuntu 18 produced warning:
[194/827] Building CXX object src/kudu/util/CMakeFiles/kudu_util.dir/
net/sockaddr.cc.o
../../src/kudu/util/net/sockaddr.cc: In member function
‘std::__cxx11::string kudu::Sockaddr::UnixDomainPath() const’:
../../src/kudu/util/net/sockaddr.cc:152:1:
warning: control reaches end of non-void function [-Wreturn-type]
Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
---
M src/kudu/util/net/sockaddr.cc
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/95/15795/3
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 3
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Bankim Bhavsar (Code Review)" <ge...@cloudera.org>.
Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc@154
PS2, Line 154: // to quite GCC warning: control reaches end of non-void function
> nit: I don't think we need the comment.
+1
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 2
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Fri, 24 Apr 2020 15:18:24 +0000
Gerrit-HasComments: Yes
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Alexey Serbin (Code Review)" <ge...@cloudera.org>.
Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/15795/3/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/3/src/kudu/util/net/sockaddr.cc@154
PS3, Line 154: return "unknown";
Since the 'default' case is now added, it seems clang won't report any warnings once a new non-handled enumeration element is added into UnixAddressType (adding a new enumeration element is highly unlikely, but anyways).
Maybe, we should do
LOG(FATAL) << "unknown unix socket address type";
return "unknown"; // unreachable
instead?
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 3
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <as...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Thu, 30 Apr 2020 01:01:50 +0000
Gerrit-HasComments: Yes
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Bankim Bhavsar (Code Review)" <ge...@cloudera.org>.
Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 1:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/15795/1/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/1/src/kudu/util/net/sockaddr.cc@152
PS1, Line 152: // to quite GCC warning: control reaches end of non-void function
: return "unknown";
It'd be better to add default switch case instead.
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 1
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Comment-Date: Fri, 24 Apr 2020 01:43:53 +0000
Gerrit-HasComments: Yes
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Volodymyr Verovkin (Code Review)" <ge...@cloudera.org>.
Volodymyr Verovkin has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/15795/1/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/1/src/kudu/util/net/sockaddr.cc@152
PS1, Line 152: }
: default:
> It'd be better to add default switch case instead.
Done
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 2
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Fri, 24 Apr 2020 07:39:06 +0000
Gerrit-HasComments: Yes
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Grant Henke (Code Review)" <ge...@cloudera.org>.
Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 2: Code-Review+1
(1 comment)
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc@154
PS2, Line 154: // to quite GCC warning: control reaches end of non-void function
nit: I don't think we need the comment.
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 2
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Fri, 24 Apr 2020 15:16:36 +0000
Gerrit-HasComments: Yes
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Volodymyr Verovkin (Code Review)" <ge...@cloudera.org>.
Hello Kudu Jenkins, Bankim Bhavsar,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/15795
to look at the new patch set (#2).
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
[warning] Fixed GCC warning "control reaches end of non-void function"
GCC 7.5 on Ubuntu 18 produced warning:
[194/827] Building CXX object src/kudu/util/CMakeFiles/kudu_util.dir/
net/sockaddr.cc.o
../../src/kudu/util/net/sockaddr.cc: In member function
‘std::__cxx11::string kudu::Sockaddr::UnixDomainPath() const’:
../../src/kudu/util/net/sockaddr.cc:152:1:
warning: control reaches end of non-void function [-Wreturn-type]
Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
---
M src/kudu/util/net/sockaddr.cc
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/95/15795/2
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 2
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins (120)
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Volodymyr Verovkin (Code Review)" <ge...@cloudera.org>.
Volodymyr Verovkin has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 3:
(2 comments)
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc@154
PS2, Line 154: return "unknown";
> nit: I don't think we need the comment.
Done
http://gerrit.cloudera.org:8080/#/c/15795/2/src/kudu/util/net/sockaddr.cc@154
PS2, Line 154: return "unknown";
> +1
Done
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 3
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Fri, 24 Apr 2020 22:56:55 +0000
Gerrit-HasComments: Yes
[kudu-CR] [warning] Fixed GCC warning "control reaches end of non-void function"
Posted by "Bankim Bhavsar (Code Review)" <ge...@cloudera.org>.
Bankim Bhavsar has posted comments on this change. ( http://gerrit.cloudera.org:8080/15795 )
Change subject: [warning] Fixed GCC warning "control reaches end of non-void function"
......................................................................
Patch Set 3:
(1 comment)
http://gerrit.cloudera.org:8080/#/c/15795/3/src/kudu/util/net/sockaddr.cc
File src/kudu/util/net/sockaddr.cc:
http://gerrit.cloudera.org:8080/#/c/15795/3/src/kudu/util/net/sockaddr.cc@149
PS3, Line 149: {
: size_t len = len_ - offsetof(struct sockaddr_un, sun_path) - 1;
: return "@" + string(storage_.un.sun_path + 1, len);
: }
Are the braces needed?
--
To view, visit http://gerrit.cloudera.org:8080/15795
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I8c22cbc18892374966975bee9e50f4119580006b
Gerrit-Change-Number: 15795
Gerrit-PatchSet: 3
Gerrit-Owner: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Reviewer: Bankim Bhavsar <ba...@cloudera.com>
Gerrit-Reviewer: Grant Henke <gr...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Volodymyr Verovkin <ve...@cloudera.com>
Gerrit-Comment-Date: Wed, 29 Apr 2020 16:50:22 +0000
Gerrit-HasComments: Yes