bug-texinfo
[Top][All Lists]
Advanced

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

Re: texinfo-6.7.91 pretest


From: Per Bothner
Subject: Re: texinfo-6.7.91 pretest
Date: Fri, 18 Jun 2021 06:52:40 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0



On 6/18/21 6:07 AM, Eli Zaretskii wrote:
From: Gavin Smith <gavinsmith0123@gmail.com>
Date: Tue, 15 Jun 2021 21:44:54 +0100

The next pretest for the next Texinfo release has been uploaded to

https://alpha.gnu.org/gnu/texinfo/texinfo-6.7.91.tar.xz

We hope to release this fairly soon barring the discovery of any major issues.

This pretest builds cleanly with MinGW on MS-Windows, and passes all
the tests (with some tests skipped, as expected).

The only compilation warning is this:

      gcc -DHAVE_CONFIG_H -I. -I..  -I..                               -I../gnulib/lib    
                     -I../gnulib/lib                         
-DLOCALEDIR=\"d:/usr/share/locale\"  -Id:/usr/include  -O2 -gdwarf-4 -g3 -MT 
install-info.o -MD -MP -MF .deps/install-info.Tpo -c -o install-info.o install-info.c
      install-info.c: In function 'split_entry.constprop':
      install-info.c:1633:11: warning: 'strncat' specified bound depends on the 
length of the source argument [-Wstringop-overflow=]
       1633 |           strncat (*description, ptr, length);
           |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      install-info.c:1632:27: note: length computed here
       1632 |           size_t length = strlen (ptr);
           |                           ^~~~~~~~~~~~

This may be a warning that it is pointless to use strncat in a case
that has exactly the same effect as strcat.

The following avoids the warning.

diff --git a/install-info/install-info.c b/install-info/install-info.c
index bd74ff0d08..5c0eeb4b3b 100644
--- a/install-info/install-info.c
+++ b/install-info/install-info.c
@@ -1629,9 +1629,8 @@ split_entry (const char *entry, char **name, size_t 
*name_len,
       else
         {
           /* Just show the rest when there's no newline. */
-          size_t length = strlen (ptr);
-          strncat (*description, ptr, length);
-          ptr += length;
+          strcat (*description, ptr);
+          ptr += strlen (ptr);
         }
     }
   /* Descriptions end in a new line. */

--
        --Per Bothner
per@bothner.com   http://per.bothner.com/



reply via email to

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