bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 1/5] stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #2


From: Paul Eggert
Subject: Re: [PATCH 1/5] stdlib: Sync canonicalize with gnulib [BZ #10635] [BZ #26592] [BZ #26241]
Date: Thu, 24 Dec 2020 14:45:17 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 12/24/20 7:16 AM, Adhemerval Zanella wrote:
It sync with gnulib version d9c121346 with the following difference
require fix a glibc build:

As I mentioned today on bug-gnulib I installed some changes into Gnulib which are related, and it'd probably be better to sync with the latest version. (Unfortunately I didn't know about your changes, so there was some overlapping work here.)

+# define FUNC_REALPATH_WORKS 1

I don't see why this change is needed, as the only use of that macro is in "#if !FUNC_REALPATH_WORKS || defined _LIBC", which is unaffected by this change since _LIBC is defined.

@@ -270,7 +270,7 @@
                buf[n] = '\0';

                char *extra_buf = extra_buffer.data;
-              idx_t end_idx;
+              idx_t end_idx = 0;
                if (end_in_extra_buffer)
                  end_idx = end - extra_buf;
                idx_t len = strlen (end);

This change isn't needed, since end_idx is used only when end_in_extra_buffer is true.

Was the latter change put in only to pacify older GCC versions? (I don't get a warning with GCC 10.2.) If so, we should do the initialization only for those older versions; or Gnulib has a GCC_LINT feature for this sort of thing.



reply via email to

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