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