Re: warnings in unit tests

2021-06-08 Thread Bruno Haible
Jim Meyering wrote: > I can live without -Wmissing-prototypes in gnulib tests, but I still > remember times where using that option exposed a real bug. -Wmissing-prototypes typically exposes real bugs when a program is composed of several compilation units. Unit tests are typically a single compil

Re: warnings in unit tests

2021-06-08 Thread Bruno Haible
Jeffrey Walton wrote: > Apple's port of Clang enables missing prototypes by default. You will > get the warnings whether you use -Wmissing-prototypes or not. You now > have to actively disable the warning with -Wno-missing-prototypes. Thanks for the heads-up. From my perspective, we can treat Appl

Re: warnings in unit tests

2021-06-08 Thread Paul Eggert
For what it's worth I'm more with Bruno on this. For the tests, the cost of these warnings outweighs the benefit. It'd be OK with me to disable the troublesome warnings globally for the tests subdirectory, using -Wno-missing-prototypes or whatever. For the -Wnull-dereference issue it may be w

Re: warnings in unit tests

2021-06-08 Thread Dmitry V. Levin
On Tue, Jun 08, 2021 at 10:56:33AM +0200, Bruno Haible wrote: > Jim Meyering wrote: > > I can live without -Wmissing-prototypes in gnulib tests, but I still > > remember times where using that option exposed a real bug. > > -Wmissing-prototypes typically exposes real bugs when a program is compose