Pacify -Wmissing-variable-declarations in unit tests.

2024-04-28 Thread Collin Funk
When building Coreutils I noticed that GCC 14's -Wmissing-variable-declarations option spams the test output. Can I apply the attached patch which adds the 'static' specifier to global variables in unit tests? Or would it be better to just disable the warning in tests? I'm used to marking things

Re: test-sprintf-posix and test-snprintf-posix test failures

2024-04-28 Thread Collin Funk
Hi Bruno, On 4/27/24 2:02 AM, Bruno Haible wrote: > At this point of the investigations, it's too early for a patch. > First, one needs to determine whether it's a bug in Gnulib or a > bug in some package we rely on (typically gcc or glibc). In the > latter case, we report the bug and wait for

Re: test-sprintf-posix and test-snprintf-posix test failures

2024-04-28 Thread Collin Funk
On 4/28/24 12:38 AM, Collin Funk wrote: > If I understand correctly, sprintf should return 4 here correct? And > the buffer should have 5 NUL bytes. 4 from the arguments and 1 > trailing, which is excluded from the return value. I have no other systems to check this on, so I will trust my

Re: [PATCH] doc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.

2024-04-28 Thread Bruno Haible
Hi Collin, > I also noticed some macros were missing from the gnulib-cache.m4 list > starting at line 375. > > Is it just out of date (git blame says ~2005) Yes. I probably forgot that these macros were documented, when adding extensions later. > If it is the first case I can add them later >

Re: Fetch from existing gnulib Git repository if needed

2024-04-28 Thread Bruno Haible
Markus Mützel wrote: > However, it looks like $GNULIB_SRCDIR is empty for us. So, the change doesn't > seem to make a difference. Executing bootstrap after a revision bump still > fails if the bootstrap script was already run before. Oh, there were two 'git checkout' commands and I enhanced

Re: Pacify -Wmissing-variable-declarations in unit tests.

2024-04-28 Thread Collin Funk
Hi Bruno, On 4/28/24 3:11 AM, Bruno Haible wrote: >> Can I apply the attached patch which adds the 'static' specifier to >> global variables in unit tests? > > No! While adding 'static' would be no harm in some tests (such as > tests/jit/test-cache.c, tests/test-argp-version-etc.c,

Re: gnulib-tool.sh: Match sorting of gnulib-tool.py in output.

2024-04-28 Thread Collin Funk
On 4/28/24 2:52 AM, Bruno Haible wrote: > Thanks! OK to push in 1 or 2 days. Sounds good. >> Though, the correct way to fix this would be making instance variables >> local when they are only used in one function. > > I agree that this kind of doing side effects on a GLConfig object that > is

[PATCH] doc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.

2024-04-28 Thread Collin Funk
Document the following gnulib-tool change: 2021-12-19 Bruno Haible gnulib-tool: Don't insist on ACLOCAL_AMFLAGS. * doc/gnulib-tool.texi (Initial import): Update the example gnulib-tool invocation. Document the use of AC_CONFIG_MACRO_DIRS as an alternative to ACLOCAL_AMFLAGS. --- ChangeLog

Re: future Python evolution

2024-04-28 Thread Bernhard Voelker
On 4/21/24 16:50, Bruno Haible wrote: Good point. Yes, Python occasionally (rarely?) makes incompatible changes. So, I've now created a continuous integration at [2]. If a Python release is made that breaks gnulib-tool, this CI will notify me shortly afterwards, and we will have time to adapt

Re: Pacify -Wmissing-variable-declarations in unit tests.

2024-04-28 Thread Bruno Haible
Hi Collin, > Can I apply the attached patch which adds the 'static' specifier to > global variables in unit tests? No! While adding 'static' would be no harm in some tests (such as tests/jit/test-cache.c, tests/test-argp-version-etc.c, tests/test-argp.c), in other tests the purpose of the global

Re: test-sprintf-posix and test-snprintf-posix test failures

2024-04-28 Thread Bruno Haible
Collin Funk wrote: > > If I understand correctly, sprintf should return 4 here correct? And > > the buffer should have 5 NUL bytes. 4 from the arguments and 1 > > trailing, which is excluded from the return value. Correct. I added a comment, because the situation in ISO C and POSIX has changed,

Re: [PATCH] doc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.

2024-04-28 Thread Bruno Haible
> + * doc/gnulib-tool.texi (Initial import): Update the example gnulib-tool > + invocation. Document the use of AC_CONFIG_MACRO_DIRS as an alternative > + to ACLOCAL_AMFLAGS. Thanks.

Re: Fetch from existing gnulib Git repository if needed

2024-04-28 Thread Markus Mützel
Hi Bruno, > > As a workaround we are applying the attached patch to the > > bootstrap-funclib.sh script to automatically fetch from the remote gnulib > > repository if the GNULIB_REVISION isn't found in the local gnulib Git > > repository. > > Thanks for the patch. But note that

Re: gnulib-tool.sh: Match sorting of gnulib-tool.py in output.

2024-04-28 Thread Bruno Haible
Hi Collin, > > The 'libtests' value read from the config in self.emitter is > > incorrect. > > This patch seems to support what I was saying here. > > diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py > index 002eb30267..11b067e085 100644 > --- a/pygnulib/GLTestDir.py > +++

Re: [PATCH] doc: Mention AC_CONFIG_MACRO_DIRS in configure.ac.

2024-04-28 Thread Collin Funk
Hi Bruno, On 4/28/24 5:02 AM, Bruno Haible wrote: >> +* doc/gnulib-tool.texi (Initial import): Update the example gnulib-tool >> +invocation. Document the use of AC_CONFIG_MACRO_DIRS as an alternative >> +to ACLOCAL_AMFLAGS. > Thanks. I also noticed some macros were missing from the

doc: Update macro list in gnulib-cache.m4 documentation.

2024-04-28 Thread Collin Funk
I've applied the attached patch updating the macro list in the gnulib-cache.m4 documentation. The macros seemed to match the order of the sed invocation in func_import of gnulib-tool.sh, so most of it was just copying from there and adjusting the gnulib-tool --help messages to fit the existing

Re: Pacify -Wmissing-variable-declarations in unit tests.

2024-04-28 Thread Collin Funk
Hi Paul, On 4/28/24 4:27 PM, Paul Eggert wrote: > For test cases this is more a judgment call, but I prefer doing either > the above or adjusting the warning flags, to ignoring warnings, as the > other warnings can be useful at time. Yeah, I could see these warnings making it hard to see ones

Re: Pacify -Wmissing-variable-declarations in unit tests.

2024-04-28 Thread Paul Eggert
On 2024-04-28 04:03, Collin Funk wrote: I will listen to the Makefile and*ignore* them now, or disable them if they start annoying me. :) Another possibility is to make each such variable 'static' if it's OK to make it static, and to precede every other variable declaration like this: int