diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2021-03-23 20:13:50 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-03-23 20:13:50 +0000 |
commit | 2881b21beda06a42c830e41a8019c292488a4880 (patch) | |
tree | fa1f72fc352e1be0af51b10b9a2981ab42c2ce4e | |
parent | f7186fb1694e55899907d45a7432ec1a12aeb36a (diff) | |
parent | 07fc05e271468cb325c942fa4f4c9c355f9f62c9 (diff) | |
download | extras-2881b21beda06a42c830e41a8019c292488a4880.tar.gz |
Merge "cmd_report_sample: provide a default value for error_code"
-rw-r--r-- | simpleperf/cmd_report_sample.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/simpleperf/cmd_report_sample.cpp b/simpleperf/cmd_report_sample.cpp index 68fa4bd8..186b120f 100644 --- a/simpleperf/cmd_report_sample.cpp +++ b/simpleperf/cmd_report_sample.cpp @@ -667,6 +667,10 @@ void ReportSampleCommand::AddUnwindingResultInProtobuf( // These error_codes shouldn't happen in simpleperf's use of libunwindstack. error_code = proto::Sample_UnwindingResult::ERROR_UNKNOWN; break; + default: + LOG(ERROR) << "unknown unwinding error code: " << unwinding_result.error_code; + error_code = proto::Sample_UnwindingResult::ERROR_UNKNOWN; + break; } proto_unwinding_result->set_error_code(error_code); } |