emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#33842: closed ([PATCH] build: avoid build failure


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#33842: closed ([PATCH] build: avoid build failure with --enable-gcc-warnings and latest gcc)
Date: Sun, 23 Dec 2018 07:27:02 +0000

Your message dated Sat, 22 Dec 2018 23:26:27 -0800
with message-id <address@hidden>
and subject line Re: bug#33842: [PATCH] build: avoid build failure with 
--enable-gcc-warnings and latest gcc
has caused the debbugs.gnu.org bug report #33842,
regarding [PATCH] build: avoid build failure with --enable-gcc-warnings and 
latest gcc
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
33842: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=33842
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] build: avoid build failure with --enable-gcc-warnings and latest gcc Date: Sat, 22 Dec 2018 23:07:13 -0800
FYI, I noticed a build failure and fixed it with the change below.

I've also pushed three more patches:
  build: make the autoconf-2.63 requirement explicit
  maint: update gnulib to latest; also update bootstrap and init.sh
  maint: improve a comment

* gzip.c (do_list): There was a loop to compute the maximum width
of a decimal positive off_t value. Replace it with assignment to a
constant.  Noticed because gcc 9.0.0 20181219 warned about its use
as a printf format-width value.
(OFF_T_MAX): Remove now-unused definition.
---
 gzip.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/gzip.c b/gzip.c
index e6a7761..bef6bc6 100644
--- a/gzip.c
+++ b/gzip.c
@@ -115,10 +115,6 @@ static char const *const license_msg[] = {
   off_t lseek (int fd, off_t offset, int whence);
 #endif

-#ifndef OFF_T_MAX
-# define OFF_T_MAX TYPE_MAXIMUM (off_t)
-#endif
-
 #ifndef HAVE_WORKING_O_NOFOLLOW
 # define HAVE_WORKING_O_NOFOLLOW 0
 #endif
@@ -1737,12 +1733,7 @@ local void do_list(ifd, method)
         "lzh  ",  /* 3 */
         "", "", "", "", /* 4 to 7 reserved */
         "defla"}; /* 8 */
-    int positive_off_t_width = 1;
-    off_t o;
-
-    for (o = OFF_T_MAX;  9 < o;  o /= 10) {
-        positive_off_t_width++;
-    }
+    int positive_off_t_width = INT_BUFSIZE_BOUND (off_t) - 2;

     if (first_time && method >= 0) {
         first_time = 0;



--- End Message ---
--- Begin Message --- Subject: Re: bug#33842: [PATCH] build: avoid build failure with --enable-gcc-warnings and latest gcc Date: Sat, 22 Dec 2018 23:26:27 -0800


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]