Dmitry V. Levin wrote: > Unlike many other gcc warnings, -Wmissing-prototypes is especially useful > because it doesn't report false positives, so I don't see why one may want > to turn -Wmissing-prototypes off.
Sometimes a function in a test is not used on some platforms. What are the possible ways to deal with it? (1) The test function could be put into a #if. This #if condition needs to be updated in some circumstances. => This approach (which I would use in lib/ code) is not zero-cost. (2) The test function can be made 'static'; then we get a compiler warning about an unused function (already with '-Wall', IIRC). (3) The test function can be made global; then we have no warning. But -Wmissing-prototypes makes it into a warning. (4) Then we need to add a prototype to fix that warning. You see my point? These are small considerations each time, but they contribute to making test authoring+maintenance a hassle. And they have no benefit (as I said, in a test that consists of a single compilation unit, linked against one or more .a files). Bruno