From 6438fd00906a4620ac883e3dd70511067915b4dd Mon Sep 17 00:00:00 2001 From: Jonas Tsai Date: Tue, 17 Sep 2024 08:33:37 +0800 Subject: [PATCH] Fix build errors encountered by some compilers (#4114) b/365029210 --- starboard/shared/pthread/thread_priority.cc | 2 ++ .../crashpad/crashpad/client/crash_report_database_generic.cc | 2 +- .../crashpad/crashpad/snapshot/linux/process_snapshot_linux.cc | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/starboard/shared/pthread/thread_priority.cc b/starboard/shared/pthread/thread_priority.cc index efddf8c8342b..a2cc5cb10631 100644 --- a/starboard/shared/pthread/thread_priority.cc +++ b/starboard/shared/pthread/thread_priority.cc @@ -35,6 +35,7 @@ int SbPriorityToNice(SbThreadPriority priority) { case kSbThreadPriorityRealTime: return -19; } + return 0; } SbThreadPriority NiceToSbPriority(int nice) { @@ -56,6 +57,7 @@ SbThreadPriority NiceToSbPriority(int nice) { if (nice == -19) { return kSbThreadPriorityRealTime; } + return kSbThreadPriorityNormal; } } // namespace diff --git a/third_party/crashpad/crashpad/client/crash_report_database_generic.cc b/third_party/crashpad/crashpad/client/crash_report_database_generic.cc index eec0db42bd3c..7fefaf1e70f1 100644 --- a/third_party/crashpad/crashpad/client/crash_report_database_generic.cc +++ b/third_party/crashpad/crashpad/client/crash_report_database_generic.cc @@ -662,7 +662,7 @@ OperationStatus CrashReportDatabaseGeneric::RemoveOldReports( all_reports.end(), completed_reports.begin(), completed_reports.end()); std::sort(all_reports.begin(), all_reports.end(), WasCreatedSooner); - while (all_reports.size() > num_reports_to_keep) { + while (all_reports.size() > static_cast(num_reports_to_keep)) { OperationStatus os = DeleteReport((*all_reports.begin()).uuid); if (os != kNoError) { return os; diff --git a/third_party/crashpad/crashpad/snapshot/linux/process_snapshot_linux.cc b/third_party/crashpad/crashpad/snapshot/linux/process_snapshot_linux.cc index b0d538f8c4bd..80c7c8a1830b 100644 --- a/third_party/crashpad/crashpad/snapshot/linux/process_snapshot_linux.cc +++ b/third_party/crashpad/crashpad/snapshot/linux/process_snapshot_linux.cc @@ -393,7 +393,7 @@ void ProcessSnapshotLinux::InitializeModules( } std::vector build_id(evergreen_info.build_id_length); - for (int i = 0; i < build_id.size(); i++) { + for (unsigned int i = 0; i < build_id.size(); i++) { build_id[i] = reinterpret_cast(evergreen_info.build_id)[i]; }