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 tha

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 f

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, tests/test-arg

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