Commit 3ba3ef00 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

crashpad: Fix bogus assignment in ternary operator

Instead of doing an assignment within one of the expressions, just use the
constant being assigned to. This also fixes a warning produced by GCC:

    ../../components/crash/content/app/crashpad.cc: In function ‘void crash_reporter::GetReportsImpl(std::vector<crash_reporter::Report>*)’:
    ../../components/crash/content/app/crashpad.cc:355:18: warning: operation on ‘report.crash_reporter::Report::state’ may be undefined [-Wsequence-point]
         report.state = pending_report.upload_explicitly_requested
         ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            ? ReportUploadState::Pending_UserRequested
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                            : report.state = ReportUploadState::Pending;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Change-Id: Ie4330b29016fce305335bb8009306a44ebba55ee
Reviewed-on: https://chromium-review.googlesource.com/992324Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#547738}
parent 9517f7cc
......@@ -354,7 +354,7 @@ void GetReportsImpl(std::vector<Report>* reports) {
report.upload_time = 0;
report.state = pending_report.upload_explicitly_requested
? ReportUploadState::Pending_UserRequested
: report.state = ReportUploadState::Pending;
: ReportUploadState::Pending;
reports->push_back(report);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment