Jim Apple has posted comments on this change. Change subject: IMPALA-3200 (buffer pool): warn if Status is ignored ......................................................................
Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/4878/2/be/src/bufferpool/buffer-allocator.h File be/src/bufferpool/buffer-allocator.h: PS2, Line 38: MUST_USE(Status) > I guess we'd have to wait for C++17, where in the link Tim sent (http://en. Good point! I guess we could pass "c++1z" rather than "c++14", but we might also need to upgrade to a newer gcc in the toolchain: https://gcc.gnu.org/projects/cxx-status.html#cxx1z Another idea is to switch to clang for all builds. I tested it, and clang allows this attribute on types: struct[[gnu::warn_unused_result]] Foo { int bar; }; Foo Baz() { return {11}; } int main() { Baz(); const auto qux = Baz(); return qux.bar; } GCC (4.9.2) warns about using the attribute in the wrong place. Clang (3.8.0-p1) warns about the unused return value from the Baz call on the first line of main. -- To view, visit http://gerrit.cloudera.org:8080/4878 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I8c26e7532b5f2c7fe167accc73179e8b72b192bc Gerrit-PatchSet: 2 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Reviewer: Dan Hecht <dhe...@cloudera.com> Gerrit-Reviewer: Jim Apple <jbap...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-HasComments: Yes