summaryrefslogtreecommitdiff
path: root/server/InterfaceController.cpp
diff options
context:
space:
mode:
authorBernie Innocenti <codewiz@google.com>2018-10-11 20:50:23 +0900
committerBernie Innocenti <codewiz@google.com>2018-10-16 21:52:12 +0900
commit6f9fd90408388330c9b47293588d68d827d68946 (patch)
tree3eb92143d6573884b6affc1aaadb3bff99060a0a /server/InterfaceController.cpp
parentb670d16e224878d2bae71db8d6788372926baea8 (diff)
Check for ignored Status results
This change makes error-checking more explicit for anything that returns a Status object and adds a grep-friendly ignoreError() method for those situations where you really didn't care. The C++17 [[nodiscard]] attribute is equivalent to the pre-existing GNU extension __attribute__((warn_unused_result)). A number of sites where errors were previously being ignored had to be adjusted to either ignore the error explicitly, handling it or propagating it to the caller. The latter two actions could potentially introduce regressions, so please double-check in case I guessed wrong. Finally, I added a few tests to verify that Status objects can be cheaply moved around without copying the embedded std::string object, since this happens at every function call boundary. Test: atest netd_integration_test Test: atest netd_unit_test Test: atest netd_benchmark netdutils_test Test: m netd ndc bpfloader libnetd_client Change-Id: I1015c916bf6c6e3b038a683a2a126a01417d3a1c
Diffstat (limited to 'server/InterfaceController.cpp')
0 files changed, 0 insertions, 0 deletions