You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Tim Armstrong (Code Review)" <ge...@cloudera.org> on 2017/01/10 22:50:02 UTC

[Impala-ASF-CR] IMPALA-2615: warn if Status is ignored

Hello Jim Apple,

I'd like you to reexamine a change.  Please visit

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

to look at the new patch set (#3).

Change subject: IMPALA-2615: warn if Status is ignored
......................................................................

IMPALA-2615: warn if Status is ignored

This introduces a WARN_UNUSED_RESULT macro. It can be used at the end
of function declarations in place of Status to issue warnings if the
return value of the function is implicitly ignored by the caller.

It can also be prepended to function definitions (gcc doesn't allow
it to be put before the { in function definitions).

This can help find bugs. E.g. I found IMPALA-4391 by applying this
to some other places in HdfsScanner.

This commit uses the macro in a few key APIs. We can use it in more
places if we agree on the pattern.

Change-Id: I8c26e7532b5f2c7fe167accc73179e8b72b192bc
---
M be/src/common/status.h
M be/src/exec/exec-node.h
M be/src/runtime/bufferpool/buffer-allocator.h
M be/src/runtime/bufferpool/buffer-pool.h
M be/src/runtime/bufferpool/reservation-tracker.h
M be/src/runtime/disk-io-mgr.h
M be/src/runtime/mem-tracker.h
M be/src/runtime/tmp-file-mgr.h
M be/src/util/openssl-util.h
9 files changed, 81 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/78/4878/3
-- 
To view, visit http://gerrit.cloudera.org:8080/4878
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8c26e7532b5f2c7fe167accc73179e8b72b192bc
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tim Armstrong <ta...@cloudera.com>
Gerrit-Reviewer: Dan Hecht <dh...@cloudera.com>
Gerrit-Reviewer: Jim Apple <jb...@apache.org>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>