Hello Zoltan Martonka, Attila Bukor, Yifan Zhang, Kudu Jenkins, Abhishek
Chennaka,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/22504
to look at the new patch set (#2).
Change subject: [util] add 'nodiscard' attribute for Status
......................................................................
[util] add 'nodiscard' attribute for Status
This patch helps to spot sloppy error handling and catch related
mistakes and bugs at compile time once Status class is marked with the
'nodiscard' attribute [1]. It has a potential of saving us time doing
debugging and troubleshooting, at least I know a few occasions where
it should have helped :)
With this patch, a non-handled result Status produces a compiler's
warning when compiling with CLANG or GCC13 and newer. People developing
on macOS and Ubuntu 24.04 can see that with this patch, and our ASAN and
TSAN pre-commit builds should produce corresponding warnings as well.
A follow-up changelist [2] turns warnings into errors. Once the
sloppiness in error handling is addressed throughout the existing code,
[2] should be added to guard against sloppy error handling
in newly added code.
[1] https://en.cppreference.com/w/cpp/language/attributes/nodiscard
[2] https://gerrit.cloudera.org/#/c/22489/
Change-Id: I1ec324e3bb5d10bc35f34ed2614e239a4a150446
---
M src/kudu/util/status.h
1 file changed, 19 insertions(+), 1 deletion(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/04/22504/2
--
To view, visit http://gerrit.cloudera.org:8080/22504
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1ec324e3bb5d10bc35f34ed2614e239a4a150446
Gerrit-Change-Number: 22504
Gerrit-PatchSet: 2
Gerrit-Owner: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Attila Bukor <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yifan Zhang <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>