https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123374

--- Comment #15 from Mark Wielaard <mark at gcc dot gnu.org> ---
So one way to work around this is to define header_read as signed:

diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 9796d31214bc..0c40ebf7a81e 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -2304,7 +2304,7 @@ extract_xz_blocks_into_fd (const string& srcpath,

   uint8_t in_buf[4096];
   uint8_t out_buf[4096];
-  size_t header_read = 0;
+  ssize_t header_read = 0;
   bool need_log_extracting = verbose > 3;
   while (true)
     {

Reply via email to