From b36b12887dfa9757054bc2f3e7a43857f015c0c6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 13 Jul 2025 09:35:38 -0700 Subject: [PATCH] =?utf8?q?int=20=E2=86=92=20ptrdiff=5Ft=20for=20read=20res?= =?utf8?q?ults?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/fileio.c (Finsert_file_contents): Use ptrdiff_t, not int, to store results returned by emacs_fd_read, which return ptrdiff_t. This doesn’t fix any bugs since the values happen to fit in int, but is a bit clearer and may simplify future changes. (cherry picked from commit 8ac78986ff7028c249f136b3523dacf0693c22d3) --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index bd8528af235..8150f4d8e12 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4501,7 +4501,7 @@ by calling `format-decode', which see. */) while (!giveup_match_end) { - int total_read, nread, bufpos, trial; + ptrdiff_t total_read, nread, bufpos, trial; off_t curpos; /* At what file position are we now scanning? */ -- 2.39.5