win: MSVS 2017 (15)/C++ 14.1/C 19.10 compatibility

Includes mini_chromium ef0ded8717340c9fe48e8e0f34f3e0e74d10a392.

1d2a024fdb1d android: Use _FILE_OFFSET_BITS after all (undo
             dc3d480305b2)
ef0ded871734 win: MSVS 2017 (15)/C++ 14.1/C 19.10 compatibility

Change-Id: I5c814669a0ef8577872bddff9112ce28ec628ba3
Reviewed-on: https://chromium-review.googlesource.com/482639
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
Mark Mentovai 2017-04-19 20:10:33 -04:00 committed by Commit Bot
parent 2815dbdf8e
commit fd8e2de0c5
4 changed files with 7 additions and 3 deletions

2
DEPS
View File

@ -38,7 +38,7 @@ deps = {
'crashpad/third_party/mini_chromium/mini_chromium':
Var('chromium_git') + '/chromium/mini_chromium@' +
'dc3d480305b27a5a1fb57f51a997529e00fed00b',
'ef0ded8717340c9fe48e8e0f34f3e0e74d10a392',
'crashpad/third_party/zlib/zlib':
Var('chromium_git') + '/chromium/src/third_party/zlib@' +
'13dc246a58e4b72104d35f9b1809af95221ebda7',

View File

@ -14,12 +14,14 @@
#include "client/prune_crash_reports.h"
#include <stddef.h>
#include <stdlib.h>
#include <algorithm>
#include <string>
#include <vector>
#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
@ -209,8 +211,8 @@ TEST(PruneCrashReports, PruneOrder) {
reports.push_back(temp);
}
// The randomness from std::rand() is not, so use a better rand() instead.
const auto random_generator = [](int rand_max) {
return base::RandInt(0, rand_max - 1);
const auto random_generator = [](ptrdiff_t rand_max) {
return base::RandInt(0, base::checked_cast<int>(rand_max) - 1);
};
std::random_shuffle(reports.begin(), reports.end(), random_generator);
std::vector<CrashReportDatabase::Report> pending_reports(

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <intrin.h>
#include <windows.h>
#include "base/files/file_path.h"

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#include <intrin.h>
#include <windows.h>
#include "base/logging.h"