Boost logo

Geometry :

Subject: [ggl] Warnings!
From: Mateusz Loskot (mateusz)
Date: 2009-06-16 11:25:24


Chris Browet wrote:
> Unfortunately, using ggl generates dozens of warnings regarding unused
> parameters, and using projections makes it hundreds!

Yes, mostly from projections stuff.

> I'd suggest to go the Qt way.
> Qt defines "#define Q_UNUSED(x) (void)x;". This (I assume) do not
> produce any code but silence the compiler.
>
> Using this mechanism, e.g., for the "dummy" parameters, would
> drastically reduce the number of warnings.

I'd prefer to follow Boost solution:

#include <boost/concept_check.hpp>

void foo(int a)
{
     boost::ignore_unused_variable_warning(a);
}

> I understand the projections are directly generated from the PROJ4 code.
> Adding this to your templates will also greatly help maintaining clean
> builds (and would allow me to again find the relevant warnings in my
> code among the noise :-)

Yes, you're perfectly right.
We've agreed on fixing

http://lists.osgeo.org/pipermail/ggl/2009-April/000109.html

Cheers,

-- 
Mateusz Loskot, http://mateusz.loskot.net

Geometry list run by mateusz at loskot.net