From e4239f66a9ff8e231c78b0967f8ea71ed6c41dfa Mon Sep 17 00:00:00 2001 From: "Node.js GitHub Bot" Date: Sun, 17 Sep 2023 00:23:25 +0000 Subject: [PATCH] deps: update zlib to 1.2.13.1-motley-2359864 --- deps/zlib/google/zip_internal.cc | 13 +++++++------ deps/zlib/google/zip_reader.cc | 16 ++++++++-------- .../maintaining/maintaining-dependencies.md | 6 +++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/deps/zlib/google/zip_internal.cc b/deps/zlib/google/zip_internal.cc index 9b20b421e24765..b9976d63ee301b 100644 --- a/deps/zlib/google/zip_internal.cc +++ b/deps/zlib/google/zip_internal.cc @@ -260,12 +260,13 @@ zip_fileinfo TimeToZipFileInfo(const base::Time& file_time) { // It assumes that dates below 1980 are in the double digit format. // Hence the fail safe option is to leave the date unset. Some programs // might show the unset date as 1980-0-0 which is invalid. - zip_info.tmz_date.tm_year = file_time_parts.year; - zip_info.tmz_date.tm_mon = file_time_parts.month - 1; - zip_info.tmz_date.tm_mday = file_time_parts.day_of_month; - zip_info.tmz_date.tm_hour = file_time_parts.hour; - zip_info.tmz_date.tm_min = file_time_parts.minute; - zip_info.tmz_date.tm_sec = file_time_parts.second; + zip_info.tmz_date = { + .tm_sec = static_cast(file_time_parts.second), + .tm_min = static_cast(file_time_parts.minute), + .tm_hour = static_cast(file_time_parts.hour), + .tm_mday = static_cast(file_time_parts.day_of_month), + .tm_mon = static_cast(file_time_parts.month - 1), + .tm_year = static_cast(file_time_parts.year)}; } return zip_info; diff --git a/deps/zlib/google/zip_reader.cc b/deps/zlib/google/zip_reader.cc index 9b1030a029c8a4..34a815e5f52e9f 100644 --- a/deps/zlib/google/zip_reader.cc +++ b/deps/zlib/google/zip_reader.cc @@ -246,14 +246,14 @@ bool ZipReader::OpenEntry() { // Construct the last modified time. The timezone info is not present in ZIP // archives, so we construct the time as UTC. - base::Time::Exploded exploded_time = {}; - exploded_time.year = info.tmu_date.tm_year; - exploded_time.month = info.tmu_date.tm_mon + 1; // 0-based vs 1-based - exploded_time.day_of_month = info.tmu_date.tm_mday; - exploded_time.hour = info.tmu_date.tm_hour; - exploded_time.minute = info.tmu_date.tm_min; - exploded_time.second = info.tmu_date.tm_sec; - exploded_time.millisecond = 0; + const base::Time::Exploded exploded_time = { + .year = static_cast(info.tmu_date.tm_year), + .month = + static_cast(info.tmu_date.tm_mon + 1), // 0-based vs 1-based + .day_of_month = static_cast(info.tmu_date.tm_mday), + .hour = static_cast(info.tmu_date.tm_hour), + .minute = static_cast(info.tmu_date.tm_min), + .second = static_cast(info.tmu_date.tm_sec)}; if (!base::Time::FromUTCExploded(exploded_time, &entry_.last_modified)) entry_.last_modified = base::Time::UnixEpoch(); diff --git a/doc/contributing/maintaining/maintaining-dependencies.md b/doc/contributing/maintaining/maintaining-dependencies.md index 0f595b3d661598..ebb2f15d9ca762 100644 --- a/doc/contributing/maintaining/maintaining-dependencies.md +++ b/doc/contributing/maintaining/maintaining-dependencies.md @@ -31,7 +31,7 @@ This a list of all the dependencies: * [undici 5.23.0][] * [uvwasi 0.0.16][] * [V8 11.3.244.8][] -* [zlib 1.2.13.1-motley-f5fd0ad][] +* [zlib 1.2.13.1-motley-2359864][] Any code which meets one or more of these conditions should be managed as a dependency: @@ -311,7 +311,7 @@ See [maintaining-web-assembly][] for more informations. high-performance JavaScript and WebAssembly engine, written in C++. See [maintaining-V8][] for more informations. -### zlib 1.2.13.1-motley-f5fd0ad +### zlib 1.2.13.1-motley-2359864 The [zlib](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/zlib) dependency lossless data-compression library, @@ -349,4 +349,4 @@ performance improvements not currently available in standard zlib. [update-openssl-action]: ../../../.github/workflows/update-openssl.yml [uvwasi 0.0.16]: #uvwasi-0016 [v8 11.3.244.8]: #v8-1132448 -[zlib 1.2.13.1-motley-f5fd0ad]: #zlib-12131-motley-f5fd0ad +[zlib 1.2.13.1-motley-2359864]: #zlib-12131-motley-2359864