Fix C++20 build.

std::string::max_size() is constexpr in C++20, which lets the compiler
determine that a comparison can never succeed.  Cast to prevent a
resulting warning.

Bug: 1284275
Change-Id: Ib56f3a9a114b9f3d2210df7846869f9452a60a58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3649750
Reviewed-by: Satoru Takabayashi <satorux@chromium.org>
Commit-Queue: Satoru Takabayashi <satorux@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1004522}
NOKEYCHECK=True
GitOrigin-RevId: 997528f9568938b61c551ff62315ecc0d1385b05
diff --git a/google/compression_utils.cc b/google/compression_utils.cc
index c7f7888..0c4cf08 100644
--- a/google/compression_utils.cc
+++ b/google/compression_utils.cc
@@ -77,7 +77,7 @@
 bool GzipUncompress(const std::string& input, std::string* output) {
   std::string uncompressed_output;
   uLongf uncompressed_size = static_cast<uLongf>(GetUncompressedSize(input));
-  if (uncompressed_size > uncompressed_output.max_size())
+  if (size_t{uncompressed_size} > uncompressed_output.max_size())
     return false;
 
   uncompressed_output.resize(uncompressed_size);