|
From: Carl E. L. <ce...@us...> - 2015-04-21 15:45:54
|
On Sun, 2015-04-19 at 07:57 -0700, Patrick J. LoPresti wrote: > On Sat, Apr 18, 2015 at 3:47 AM, Florian Krohm <fl...@ei...> wrote: > > > > What you describe would work but require additional configury. And that > > is something I would like to avoid. We already have 3000 lines of it. > > If will be less work to simply modify the test to not pass these values > > as function arguments. > > Assuming that is possible, I agree. Although even that demands > cluttering the source with a long comment if the needed approach is > unnatural. > > When it is impossible or inconvenient to modify the source, the > approach I have seen is to place all such warning suppressions in one > header file. And then dispatch on the compiler version in that header > (not in the configure script). Something like > <http://stackoverflow.com/a/18463996/768469>. > > This approach keeps the source uncluttered, and it adds little to the > testing burden since (a) it is simple enough to get right every time > and (b) these are just warning suppressions. > > This is part of the cost of keeping everything "-Wall clean" across > multiple platforms. But it is not a large cost compared to the > benefits. > > - Pat > The test code follows a basic structure which is used across a wide range of tests. I will take a look at the code and see if I can put the arguments into a struct and pass the struct without adding too much confusion to the code. I think that would be preferable to messing around with the configuration file for the compile. Carl Love |