You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@kudu.apache.org by "Yingchun Lai (Code Review)" <ge...@cloudera.org> on 2023/05/29 06:02:50 UTC

[kudu-CR](branch-1.17.x) [util] use include guard macro in int128.h header

Hello Alexey Serbin, Abhishek Chennaka,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/19945

to review the following change.


Change subject: [util] use include guard macro in int128.h header
......................................................................

[util] use include guard macro in int128.h header

Even if '#pragma once' is supported by the vast majority of modern
compilers, it is a non-standard one [1].  The src/kudu/util/int128.h
file is included into other header files of the C++ Kudu client API,
which is supposed to be C++98 compliant.  Since other header files
in the C++ client API are using include guard macros, let's use
the same technique for int128.h as well.

Doing so addresses a warning produced by the CLANG when running
client_examples_test.sh, while a standalone compilation is done on the
kudu/util/int128.h file:

  #pragma once in main file [-Wpragma-once-outside-header]

[1] https://en.cppreference.com/w/cpp/preprocessor/impl

Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Reviewed-on: http://gerrit.cloudera.org:8080/19783
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
Tested-by: Alexey Serbin <al...@apache.org>
---
M src/kudu/util/int128.h
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/45/19945/1
-- 
To view, visit http://gerrit.cloudera.org:8080/19945
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Gerrit-Change-Number: 19945
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>

[kudu-CR](branch-1.17.x) [util] use include guard macro in int128.h header

Posted by "Yuqi Du (Code Review)" <ge...@cloudera.org>.
Yuqi Du has posted comments on this change. ( http://gerrit.cloudera.org:8080/19945 )

Change subject: [util] use include guard macro in int128.h header
......................................................................


Patch Set 1: Code-Review+1


-- 
To view, visit http://gerrit.cloudera.org:8080/19945
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Gerrit-Change-Number: 19945
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Wed, 31 May 2023 02:52:26 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.17.x) [util] use include guard macro in int128.h header

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has posted comments on this change. ( http://gerrit.cloudera.org:8080/19945 )

Change subject: [util] use include guard macro in int128.h header
......................................................................


Patch Set 1: Code-Review+1


-- 
To view, visit http://gerrit.cloudera.org:8080/19945
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Gerrit-Change-Number: 19945
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Comment-Date: Mon, 29 May 2023 06:28:36 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.17.x) [util] use include guard macro in int128.h header

Posted by "Yifan Zhang (Code Review)" <ge...@cloudera.org>.
Yifan Zhang has posted comments on this change. ( http://gerrit.cloudera.org:8080/19945 )

Change subject: [util] use include guard macro in int128.h header
......................................................................


Patch Set 1: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/19945
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: comment
Gerrit-Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Gerrit-Change-Number: 19945
Gerrit-PatchSet: 1
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>
Gerrit-Comment-Date: Wed, 31 May 2023 04:03:24 +0000
Gerrit-HasComments: No

[kudu-CR](branch-1.17.x) [util] use include guard macro in int128.h header

Posted by "Yingchun Lai (Code Review)" <ge...@cloudera.org>.
Yingchun Lai has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/19945 )

Change subject: [util] use include guard macro in int128.h header
......................................................................

[util] use include guard macro in int128.h header

Even if '#pragma once' is supported by the vast majority of modern
compilers, it is a non-standard one [1].  The src/kudu/util/int128.h
file is included into other header files of the C++ Kudu client API,
which is supposed to be C++98 compliant.  Since other header files
in the C++ client API are using include guard macros, let's use
the same technique for int128.h as well.

Doing so addresses a warning produced by the CLANG when running
client_examples_test.sh, while a standalone compilation is done on the
kudu/util/int128.h file:

  #pragma once in main file [-Wpragma-once-outside-header]

[1] https://en.cppreference.com/w/cpp/preprocessor/impl

Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Reviewed-on: http://gerrit.cloudera.org:8080/19783
Reviewed-by: Abhishek Chennaka <ac...@cloudera.com>
Tested-by: Alexey Serbin <al...@apache.org>
Reviewed-on: http://gerrit.cloudera.org:8080/19945
Reviewed-by: Yingchun Lai <la...@apache.org>
Tested-by: Kudu Jenkins
Reviewed-by: Yuqi Du <sh...@gmail.com>
Reviewed-by: Yifan Zhang <ch...@163.com>
---
M src/kudu/util/int128.h
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Yingchun Lai: Looks good to me, but someone else must approve
  Kudu Jenkins: Verified
  Yuqi Du: Looks good to me, but someone else must approve
  Yifan Zhang: Looks good to me, approved

-- 
To view, visit http://gerrit.cloudera.org:8080/19945
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: branch-1.17.x
Gerrit-MessageType: merged
Gerrit-Change-Id: Ica18bbdc8eff034965e1a69404df2180cacf7bb4
Gerrit-Change-Number: 19945
Gerrit-PatchSet: 2
Gerrit-Owner: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Abhishek Chennaka <ac...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <al...@apache.org>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <ch...@163.com>
Gerrit-Reviewer: Yingchun Lai <la...@apache.org>
Gerrit-Reviewer: Yuqi Du <sh...@gmail.com>